简体   繁体   中英

Quartz Cron Expression not working correctly

I'm building an integration using Apache Camel. I have two routes that are triggered by the following cron expressions:

quartz2:delayone?cron=0 */15 23,0 * * ?

quartz2:delaytwo?cron=0 */15 3,4 * * ?

I expect the first to be triggered each day at 11pm every 15 minutes until 12.45 am, which it does!

I expect the second one to be triggered each day at 3am every 15 minutes until 3.45am, which ... it doesn't, it only fires twice once at 3am and then again at 3.15am!

Can you spot anything I am doing wrong?

I recommend you to use an online cron expression generator, like this one .

在此处输入图片说明

Please note also that the 0 is the first hour, not the last one. So in "23,0", 0 is not the hour following 11pm, it's 0 am - see screenshot

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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