The complete table
| Char | Name | Meaning | Example |
* | Asterisk | Any value | * * * * * = every minute |
, | Comma | List of values | 0,15,30,45 * * * * = every 15 min |
- | Hyphen | Range | 9-17 in hour = 9 AM through 5 PM |
/ | Slash | Step | */5 in minute = every 5 minutes |
? | Question mark | No specific value (Quartz/AWS) | 0 9 ? * MON-FRI |
L | Last (Quartz/AWS) | Last day of month or last weekday | 0 0 0 L * ? |
W | Weekday (Quartz/AWS) | Nearest weekday to a date | 0 0 0 15W * ? |
# | Hash (Quartz/AWS) | Nth weekday of month | 0 0 0 ? * 2#1 = 1st Monday |
H | Hash (Jenkins-only) | Random offset per job | H */5 * * * * |
@ | Macro | Shorthand expression | @daily = 0 0 * * * |
Platform support
| Platform | * , - / | ? | L W # | H | @macros |
| Unix cron (Vixie) | ✓ | ✗ | ✗ | ✗ | ✓ |
| Quartz | ✓ | ✓ | ✓ | ✗ | ✗ |
| AWS EventBridge | ✓ | ✓ | ✓ | ✗ | ✗ |
| Spring @Scheduled | ✓ | ✓ | ✓ | ✗ | ✓ (limited) |
| Kubernetes CronJob | ✓ | ✗ | ✗ | ✗ | ✗ |
| GitHub Actions | ✓ | ✗ | ✗ | ✗ | ✗ |
| Azure Functions (NCRONTAB) | ✓ | ✗ | ✗ | ✗ | ✗ |
| Jenkins | ✓ | ✗ | ✗ | ✓ | ✓ |
Combining characters within a field
You can mix multiple special characters in the same field:
0-30/5 # Every 5 minutes from 0 to 30 (0, 5, 10, 15, 20, 25, 30)
1,15,30 # Minutes 1, 15, and 30
1-5,15,30 # Minutes 1-5, plus 15 and 30
9-17/2 # Every 2 hours from 9 AM to 5 PM (9, 11, 13, 15, 17)
Macros reference
| Macro | Expands to | Meaning |
@yearly / @annually | 0 0 1 1 * | Once a year, Jan 1 midnight |
@monthly | 0 0 1 * * | 1st of every month, midnight |
@weekly | 0 0 * * 0 | Sunday midnight |
@daily / @midnight | 0 0 * * * | Every day at midnight |
@hourly | 0 * * * * | Top of every hour |
@reboot | (no expansion) | Once at system startup |
Written by Murugan Vellaichamy. Suggestions or corrections? Get in touch.