Arulkumar
Arulkumar

Reputation: 13237

Cron expression for every 20 minutes in between 12:00 AM to 12:59 AM, only on Saturday

I like to schedule an Azure WebJob for the following scenario:

Every 20 minutes in between 12:00 AM to 12:59 AM, only on Saturday.

i.e., I expect the web job to be run on 3 occurrences: 12:00 AM, 12:20 AM, and 12:40 AM on Saturday.

So, will the Cron Expression: 0 */20 0,1 * * 6 satisfy the scenario?
If not, please someone suggest the correct expression for the same.

Upvotes: 1

Views: 290

Answers (1)

George Chen
George Chen

Reputation: 14324

The right cron should be 0 */20 0 * * Sat, if you set it with 0 */20 0,1 * * 6, it will also run at 1:00, 1:20 and 1:40.
More details refer to this doc: NCRONTAB expressions.

enter image description here

Upvotes: 2

Related Questions