1

I am in need to create a cron triggers expression which should fire on every week at 3 pm and start date from 25th April 2012.

Please note i am using CronTriggerImpl and i want to use it in the C# DotNet.

Thanks in advance

user1301587
  • 455
  • 4
  • 11
  • 23
  • http://www.quartz-scheduler.org/documentation/quartz-2.x/tutorials/tutorial-lesson-06 – VJAI Apr 11 '12 at 13:50

1 Answers1

1

The expressions have the format

sec min hour DayOfMonth Month DayOfWeek Year

so with 3 expressions you should be able to get what you want.

0 0 3 25-30 4   0 2012    
0 0 3 *   5-12  0 2012
0 0 3 *   *   0 2013-2099

Line 1 says: 3 pm on first day of week on day of month larger-or-equal to 25th in april month in year 2012

Line 2 says: 3 pm on first day of week on any day of month in months largeror-equal to may in year 2012

Line 3 says: 3 pm on first day of week on any day of month in any month in year larger-or-equal to 2013.

Otherwise just use the simple expression

0 0 3 * * 0 *

combined with

newTrigger().startAt(new DateTime("2012-04-25"))

Disclaimer: I've not actually tried this. :)

Edit: I'm not sure quartz likes open ranges... so they're closed now.

Kenned
  • 568
  • 4
  • 11