问题描述
我需要使用Quartz.NET实施以下情形:
i need to implement the following scenario using Quartz.NET:
在岑参每N周(S):结果
周日和/或周一,周二,周三,周四,周五,周六...
Recur every n week(s) on:
Sunday and/or Monday, Tuesday, Wednesday, Thursday, Friday, Saturday...
因此,例如,我可能会选择:周一,周四和复发,每2周,这是可能的。
So for example i might select: monday and thursday, and recur every 2 weeks, is this possible?
我弄明白了去可能使用cron防爆pressions,但我还没有运气至今的岑参每X周的方式
I figure it out that the way to go might be using Cron Expressions, but i haven't had luck so far with the "Recur Every X Weeks"
谢谢!
推荐答案
这是我使用的解决方案......
This is the solution that i used...
在没有重复周期我用一个cron触发器,并选择天,使其运行每周
When there is no recurence i use a cron trigger and select the days and make it run every week
例如。
0 0 * * 1,2,3
E.G.0 0 * * 1,2,3
当有重复周期为每个选定的一天我加的SimpleTrigger,bassically开始日期是星期几,然后我用了7个续订相乘计算复发
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
所以,我最终会每天机智1的SimpleTrigger。
So i will end up wit one simpletrigger for each day.
我希望这可以帮助别人!
I hope this helps someone else!
这篇关于Quartz.NET,重现每x周的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!