简体   繁体   English

Quartz Scheduler - Cron Trigger表达式不起作用

[英]Quartz Scheduler - Cron Trigger expression not working

I am using Quartz scheduler in order to schedule some sequence of functionalities in my java project. 我正在使用Quartz调度程序来安排我的java项目中的一些功能序列。 I want the scheduler to start at 08:00:00 and to repeat for every four hours till 16:00:00. 我希望调度程序从08:00:00开始,每隔4小时重复一次,直到16:00:00。 I have tried doing this using CRONTrigger with below expression: 我尝试使用CRONTrigger以下表达式执行此操作:

"0 0 8,12,16 * * ?" “0 0 8,12,16 * *?”

But it is not working fine as expected. 但它没有像预期的那样正常工作。 Please help me in resolving this. 请帮我解决这个问题。 Thanks in advance. 提前致谢。

Try the next: 尝试下一个:

0 0 8,12,16 ? * *

Whit this, CronMaker show the next sample scheduled dates: 在此, CronMaker显示下一个样本预定日期:

1. Wednesday, May 29, 2013  8:00 AM
2. Wednesday, May 29, 2013 12:00 PM
3. Wednesday, May 29, 2013  4:00 PM
4. Thursday,  May 30, 2013  8:00 AM
5. Thursday,  May 30, 2013 12:00 PM

Hey you can visit http://www.cronmaker.com/ in this site you can create your cron expression or test this one. 嘿,你可以访问http://www.cronmaker.com/在这个网站上你可以创建你的cron表达或测试这个。 or you can try this 0 0 8,12,16 1/1 * ? * 或者你可以尝试这个0 0 8,12,16 1/1 * ? * 0 0 8,12,16 1/1 * ? *

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM