Understand the Cron Format and Special Characters
masterThe library supports a standard cron format with an optional second field. The order of fields is:
second (0-59, optional) | minute (0-59) | hour (0-23) | day of month (1-31) | month (1-12) | day of week (0-7, where 0 or 7 is Sunday).
Special Characters
| Character | Description | Example |
|---|---|---|
* | Any value | * * * * * (every minute) |
? | Any value (alias for *) | ? * * * * (every minute) |
, | Value list separator | 1,2,3 * * * * (1st, 2nd, and 3rd minute) |
- | Range of values | 1-5 * * * * (every minute from 1 through 5) |
/ | Step values | */5 * * * * (every 5th minute) |
L | Last day of month/week | 0 0 L * * (midnight on last day of month) |
# | Nth day of month | 0 0 * * 1#1 (first Monday of month) |
H | Randomized value | H * * * * (every n minute where n is randomly picked within [0, 59]) |