Quartz.NET, Recur Every x Weeks

前端 未结 4 1285
灰色年华
灰色年华 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 08:01

    This is the solution that i used...

    When there is no recurence i use a cron trigger and select the days and make it run every week

    E.G. 0 0 * * 1,2,3

    when there is recurence for each selected day i add a SimpleTrigger, bassically the start date is the day of the week, and then i calculate the recurrence by multiplying the recurence for 7

    So i will end up wit one simpletrigger for each day.

    I hope this helps someone else!

提交回复
热议问题