8
votes

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,

1

1 Answers

10
votes

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