Cron expressions¶
Cron expressions encode a repeating interval of time. The format
supported by the pump machinery of the Sesam node is explained in more
detail below. It mostly follows the explanation here:
https://en.wikipedia.org/wiki/Cron but note that the special characters
W
and #
are not supported by our implementation.
Note
Cron expressions are evaluated in the UTC timezone.
Syntax¶
A cron expression is a string of 5 or 6 fields separated by space character. The string is parsed from left to right and denotes in sequence:
Field name |
Mandatory? |
Allowed values |
Allowed special characters |
---|---|---|---|
|
Yes |
0-59 |
* , - / |
|
Yes |
0-23 |
* , - / |
|
Yes |
1-31 |
* , - ? L |
|
Yes |
1-12 or JAN-DEC |
* , - / |
|
Yes |
0-6 or SUN-SAT |
* , - ? L / |
|
No |
1970–2099 |
* , - |
Examples¶
Expression |
Meaning |
---|---|
|
Start at noon every day |
|
Start at 10:15 every day |
|
Start at 10:15 every day |
|
Start at 10:15 every day during the year 2016 |
|
Start every minute starting at 14:00 and ending at 14:59, every day |
|
Start every 5 minutes starting at 14:00 and ending at 14::55, every day |
|
Start every 5 minutes starting at 14:00 and ending at 14:55, and also fire every 5 minutes starting at 18:00 and ending at 18:55, every day |
|
Start every minute starting at 14:00 and ending at 14:05, every day |
|
Start at 14:10 and at 14:44 every wednesday in March |
|
Start at 10:15 every monday to friday |
|
Start at 10:15 on the 15th day of every month |
|
Start at 10:15 on the last day of every month |
|
Start at 10:15 on the last friday of every month |
|
Start at 10:15 on every last friday of every month for the years 2002 to 2005 |
|
Start at 10:15 on the third friday of every month |
|
Start at noon every 5 days every month, starting with the first day of the month |
|
Start every 11th of november at 11:11 |