I have a requirement to execute a task every 3 months on the 3rd Tuesday and 3rd Thursday of the month.
The CRON expression that I have come up with is:
0 15 0 ? 3/3 3#3,5#3 *
However when I try to parse this using Quartz 2.2.1
:
var cron = new Quartz.CronExpression("0 15 0 ? 3/3 3#3,5#3 *");
cron.GetNextValidTimeAfter(DateTimeOffset.Now).Dump();
I get:
FormatException: Support for specifying multiple "nth" days is not implemented.
Any ideas on how to get this implemented without having to resort to two separate CRON jobs, e.g:
// Tuesday
0 15 0 ? 3/3 3#3 *
// Thursday
0 15 0 ? 3/3 5#3 *
As of today, this feature is not supported and as you have mentioned the best way to achieve what you want is by specifying two separate CRON jobs.