Cron表达式(Quartz),程序在每天午夜12点运行 [英] Cron Expression (Quartz) for a program to run every midnight at 12 am
问题描述
Quartz Scheduler中的cron表达式在GMT每个午夜12点运行程序。
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点(中午)
。有谁能告诉我吗?
Is the expression 0 0 12 * * ?
or is that for 12 pm (noon)
. Could anyone please tell me?
谢谢你,
有一个愉快的一天:)
Thank you, Have a nice day :)
推荐答案
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
有一个令人敬畏的日子!
Have an awesome day!
这篇关于Cron表达式(Quartz),程序在每天午夜12点运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!