Quartz expression cron - last Thursday of every month

I use Quartz Scheduling and Spring Batch, and I need to run a specific job on the last Thursday of every month.

Is it possible to create such a quartz expression cron?

Thanks,

+7
source share
1 answer

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

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

 0 0 10 ? * 5L 
+8
source

All Articles