Quartz Cron Expression not working correctly

Johnny Alpha :

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?

TacheDeChoco :

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

enter image description here

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

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=395918&siteId=1