Can't figure out CRON expression for Scheduler

I’m having troubles running a CRON expression with hour range–in this example from 4am to 11pm. The context is that I would like to run 1 year analytics throughout “normal” hours and then run All years 1 time each day (at midnight). I am first trying to get this to run so that I can create another job for the all years and put them all in a queue.

Thanks for any help!

3 Likes

@lorimetz4 figured it out for me! 0 * 04-23 * * * accomplishes this well. Thanks Lori!

3 Likes

Great! It is interesting that the leading zero doesn’t seem to be needed if both hours in the range are single digits, but when one is 2 digits (in this case 23), the zero leading zero is needed for the Scheduler to accept it as valid.

2 Likes

It is interesting that the leading zero doesn’t seem to be needed if both hours in the range are single digits, but when one is 2 digits (in this case 23), the zero leading zero is needed for the Scheduler to accept it as valid.

Sorry. This is a bug. 4-23 should also be accepted as a valid range. I’m glad that you’ve been able to work around this!

I’ve created a ticket for us to fix this in the app: Jira

Thanks for letting us know.

2 Likes