Quartz.NET, Recur Every x Weeks

前端 未结 4 1281
灰色年华
灰色年华 2020-12-06 07:29

i need to implement the following scenario using Quartz.NET:

Recur every n week(s) on:
Sunday and/or Monday, Tuesday, Wednesday, Thursday, Friday, Saturday...

4条回答
  •  暖寄归人
    2020-12-06 07:59

    Is running Quartz.Net 2.0 and option for you? It has not been officially released yet, but in it there is a new trigger type that solves your problem. It's called the calendar interval trigger. Basically you define it just as you described in your question. You set the interval to 2 and the interval unit to weeks, and it fires every 2 weeks. I've written a post describing it here. You can access the source code documentation here.

提交回复
热议问题