Reputation: 545
I'm creating an azure function which should run on every two hours from 7am to 9pm everyday. I've tried build a CRON expression for this using a generator but it cannot meet both conditions (every two hours and from 7am-9pm). Can somebody please help me to build the expression.
Upvotes: 2
Views: 1388
Reputation: 97322
You can just list the hours explicitly:
0 0 7,9,11,13,15,17,19,21 * * *
This should also work:
0 0 7-21/2 * * *
Upvotes: 2
Reputation: 1619
Perhaps this?
From 7am until 9pm (or 2100 hours) with a step value of 2 (ie. every 2 hours)
Upvotes: 3