Accepted Cron syntax when scheduling a server task

Prev Next

If you select the Schedule typeAdvanced option when scheduling a server task, you can specify a schedule using Cron syntax.

Cron syntax is made up of six or seven fields, separated by a space. Accepted Cron syntax, by field in descending order, is detailed in the following table. Most Cron syntax is acceptable, but a few cases are not supported. For example, you cannot specify both the Day of Week and Day of Month values.

Field name

Allowed values

Allowed special characters

Seconds

0–59

, - * /

Minutes

0–59

, - * /

Hours

0–23

, - * /

Day of Month

1–31

, - * ? / L W C

Month

1–12, or JAN - DEC

, - * /

Day of Week

1–7, or SUN - SAT

, - * ? / L C #

Year (optional)

Empty, or 1970–2099

, - * /

Allowed special characters

  • Commas (,) are allowed to specify more values. For example, "5,10,30" or "MON,WED,FRI".

  • Asterisks (*) are used for "every." For example, "*" in the minutes field is "every minute".

  • Question marks (?) are allowed to specify no specific value in the Day of Week or Day of Month fields.

    Note

    The question mark must be used in one of these fields, but cannot be used in both.

  • Forward slashes (/) identify increments. For example, "5/15" in the minutes field means the task runs at minutes 5, 20, 35 and 50.

  • The letter "L" means "last" in the Day of Week or Day of Month fields. For example, "0 15 10 ? * 6L" means the last Friday of every month at 10:15 am.

  • The letter "W" means "weekday". So, if you created a Day of Month as "15W", this means the weekday closest to the 15th of the month. Also, you can specify "LW", which means the last weekday of the month.

  • The pound character "#" identifies the "Nth" day of the month. For example, using "6#3" in the Day of Week field is the third Friday of every month, "2#1" is the first Monday, and "4#5" is the fifth Wednesday.

    Note

    If the month does not have a fifth Wednesday, the task does not run.