quartz cron 将在 15 日和一个月的最后一天 运行
quartz cron that will run on 15 and the last day of month
您好,我尝试设置一个 quartz 作业,它将 运行 在每月的 15 日和最后一天。
这不起作用:
0 0 0 15,L * ? *
我做错了什么?
根据 CronTrigger 教程 (http://www.quartz-scheduler.org/documentation/quartz-2.x/tutorials/tutorial-lesson-06.html):
When using the ‘L’ option, it is important not to specify lists, or ranges of values, as you’ll get confusing/unexpected results.
你可以做的是使用 2 个独立的触发器来执行相同的命令:
0 0 0 15 * ? *
和
0 0 0 L * ? *
希望这对您的问题有所帮助。
您好,我尝试设置一个 quartz 作业,它将 运行 在每月的 15 日和最后一天。
这不起作用:
0 0 0 15,L * ? *
我做错了什么?
根据 CronTrigger 教程 (http://www.quartz-scheduler.org/documentation/quartz-2.x/tutorials/tutorial-lesson-06.html):
When using the ‘L’ option, it is important not to specify lists, or ranges of values, as you’ll get confusing/unexpected results.
你可以做的是使用 2 个独立的触发器来执行相同的命令:
0 0 0 15 * ? *
和
0 0 0 L * ? *
希望这对您的问题有所帮助。