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.

CODE
┌──────────── 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:

Table 1. Valid values for cron fields

Field

Single integer or string values

Multiple values

minute

0-59

  • step increments represented by a slash (/)

  • list of values separated by commas (,)

  • integer range separated by a hyphen (-)

  • asterisk (*) to represent all possible values

hour

0-23

day of month

1-31

month

  • 1-12

  • JAN-DEC

day of week

  • 0-7 (Sunday is 0 and 7)

  • SUN-SAT

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.

Note: These examples show a variation of the standard cron syntax as used by Automate.