quartz scheduler: run on last day of the month

你离开我真会死。 提交于 2019-12-21 03:53:15

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/4962011/quartz-scheduler-run-on-last-day-of-the-month

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!