Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

quartz scheduler: run on last day of the month

I need to run a job on the last day of every month. i tried the following cron expression:

<property name="cronExpression" value="0 0 3 L * * *" />

but got this error:

Caused by: java.lang.UnsupportedOperationException: Support for specifying both a day-of-week AND a day-of-month parameter is not implemented.

it doesnt like the L, but without using it, how can i run on the last day of the month?

like image 300
mkoryak Avatar asked Feb 10 '11 20:02

mkoryak


1 Answers

Just change your trigger to

0 0 3 L * ?

One of day of week or day of month needs to be ?. You cannot specify both.

like image 144
mdrg Avatar answered Sep 25 '22 03:09

mdrg