8

I am using Quartz Scheduling and Spring Batch and I need to run a particular job on the last Thursday of every month.

Is it possible to create such a Quartz cron expression?

Thanks,

Joel
  • 689
  • 2
  • 10
  • 15
  • 1
    this may be? http://stackoverflow.com/questions/4962011/quartz-scheduler-run-on-last-day-of-the-month – Eugene Aug 14 '12 at 11:49

1 Answers1

10

Yes, Quartz has a special character -- L ("last") --, which allows you to define expressions such as the last friday of the month.

To fire a job at, say, 10am, on the last Thursday (5L) of every month, you can use the following cron expression:

0 0 10 ? * 5L
João Silva
  • 89,303
  • 29
  • 152
  • 158