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,
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With