I'm stuck with Quartz.NET cron trigger. I was able to imlpement all my scenarios apart the one below.
I managed to do this
0 31 15 ? * MON#2 *
which triggers every second Monday.
Would it work with 0 31 15 ? * MON#2,TUE#2,WED#2 *
??
I tried testing it on http://www.cronmaker.com however It only showed me Mondays as coming up dates. My only requirement is to keep it simple - ie. no more than one trigger.
As per their website: Quartz.NET is a full-featured, open source job scheduling system that can be used from smallest apps to large scale enterprise systems. It's an old staple of many ASP.NET developers, used as a way of running background tasks on a timer, in a reliable, clustered, way.
Cron Schedule Examples : A Cron expression is designed to specify what date and time the scheduled task must be executed. Using Cron expressions, we can specify schedules such as the following. Run every minute every one hour. Run every hour, starting from the 15-minute mark of the hour.
I agree with Brabster.
I don't think it is possible with a Cron Expression.
Quartz.net 2.0 has a new type of trigger called CalendarIntervalTrigger which can be used to manage different interval units. You can read more here.
UPDATE:
Here's the link to the quartz.net 2.0 repository.
I've used the Java Quartz implementation, assuming they are similar then I don't think it's possible to express what you need as a single CronTrigger.
In Java we have the DateIntervalTrigger, but I don't think this could do what you need in a single trigger either. Unfortunately, as triggers can't be composed in the API itself,I guess there will be limits as to the complexity of triggers that can be expressed as a single trigger.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With