Cron 表达式 (Quartz) 用于每午夜 12 点运行的程序 [英] Cron Expression (Quartz) for a program to run every midnight at 12 am
问题描述
Quartz Scheduler 中在格林威治标准时间午夜 12 点运行程序的 cron 表达式是什么.
What is the cron expression in Quartz Scheduler to run a program at 12 am every midnight GMT.
我之前从未使用过石英所以我还在学习中.
I have never used quartz before so I am still learning.
表达式是 0 0 12 * * ?
还是 12 pm (noon)
.谁能告诉我?
Is the expression 0 0 12 * * ?
or is that for 12 pm (noon)
. Could anyone tell me?
推荐答案
1 秒2分钟3小时4 月份5个月6 星期几7 年(可选字段)
1 Seconds 2 Minutes 3 Hours 4 Day-of-Month 5 Month 6 Day-of-Week 7 Year (optional field)
所以在你的情况下:
0 0 0 * * ?
0 0 0 * * ?
如果你想在中午开火,这将在午夜开火:
This will fire at midnight, if you want to fire at noon:
0 0 12 * * ?
0 0 12 * * ?
或两者兼而有之:
0 0 0,12 * * ?
0 0 0,12 * * ?
如果你想变得更复杂,一个很好的页面:http://www.quartz-scheduler.org/documentation/quartz-2.x/tutorials/tutorial-lesson-06
A good page if you want to get more complicated: http://www.quartz-scheduler.org/documentation/quartz-2.x/tutorials/tutorial-lesson-06
度过美好的一天!
这篇关于Cron 表达式 (Quartz) 用于每午夜 12 点运行的程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!