Cron Expressions
Define schedules using cron expression syntax.
Cron Syntax
Cron expressions have 5 fields:
┌───────────── minute (0 - 59)
│ ┌───────────── hour (0 - 23)
│ │ ┌───────────── day of month (1 - 31)
│ │ │ ┌───────────── month (1 - 12)
│ │ │ │ ┌───────────── day of week (0 - 6, Sun = 0)
│ │ │ │ │
* * * * *Special Characters
*- Every value,- List (1,15 = 1st and 15th)-- Range (1-5 = 1 through 5)/- Step (*/5 = every 5)
Common Examples
| Expression | Schedule |
|---|---|
0 2 * * * | Daily at 2:00 AM |
0 */4 * * * | Every 4 hours |
0 0 * * 0 | Weekly on Sunday at midnight |
0 0 1 * * | Monthly on the 1st at midnight |
*/30 * * * * | Every 30 minutes |
0 9-17 * * 1-5 | Hourly 9AM-5PM, weekdays |