石英调度程序:在本月的最后一天运行 [英] quartz scheduler: run on last day of the month

查看:38
本文介绍了石英调度程序:在本月的最后一天运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在每个月的最后一天运行一个作业.我尝试了以下 cron 表达式:

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 * * *" />

但得到这个错误:

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

它不喜欢L,但不使用它,我如何在每月的最后一天运行?

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

推荐答案

只需将触发器更改为

0 0 3 L * ?

一周中的某一天或一个月中的某一天必须是 ?.您不能同时指定两者.

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

这篇关于石英调度程序:在本月的最后一天运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆