Reference: Cron syntax for Automate
Automate uses a variation of the standard cron format. Use the following quick reference and examples to build your cron expressions.
┌──────────── minute
│ ┌────────── hour
│ │ ┌──────── day of month
│ │ │ ┌────── month
│ │ │ │ ┌──── day of week
│ │ │ │ │
│ │ │ │ │
* * * * *
Each asterisk is a field that must be included in the cron expression. The field value can be one of the following values:
|
Field |
Single integer or string values |
Multiple values |
|---|---|---|
|
minute |
0-59 |
|
|
hour |
0-23 |
|
|
day of month |
1-31 |
|
|
month |
|
|
|
day of week |
|
Note the following:
-
The following characters are not supported:
H,L,W,#,?,(,) -
The year field and second field are not supported.
-
Automate uses a variation of the standard cron format where specific values in both the day of month and day of week fields result in playbook runs only when both match. For example, the cron expression * * 1 * 1 matches days that are both the first day of the month and a Monday.
Cron expression examples
Use the following cron expressions to schedule playbook runs around Patch Tuesday:
-
Patch Tuesday (second Tuesday of each month): 0 21 8-14 * 2. Runs at 9:00 PM on a Tuesday between the 8th and 14th.
-
Day after Patch Tuesday: 0 21 9-15 * 3. Runs at 9:00 PM on a Wednesday between the 9th and 15th.