spring cron jobs sceduler , monthly basis

106 views Asked by At

What would be the spring cron-expression if I want to run a job in the last business day of the month. Like if the month ends in sat-sun I need to fire it on Friday. Business day includes Mon-Fri.

1

There are 1 answers

0
Evgeni Dimitrov On

You need to use the LW expression see this: http://quartz-scheduler.org/documentation/quartz-1.x/tutorials/crontrigger

  The 'L' and 'W' characters can also be combined in the day-of-month field 
to yield 'LW', which translates to *"last weekday of the month"*.