Cron expressions define schedules for automated tasks. Originally from Unix cron, they're now used everywhere — Kubernetes CronJobs, GitHub Actions, AWS EventBridge, CI/CD pipelines, and task schedulers in virtually every programming language.
Anatomy of a Cron Expression
A standard cron expression has 5 fields:
┌───────────── minute (0-59)
│ ┌───────────── hour (0-23)
│ │ ┌───────────── day of month (1-31)
│ │ │ ┌───────────── month (1-12)
│ │ │ │ ┌───────────── day of week (0-6, 0=Sunday)
│ │ │ │ │
* * * * *
Some systems add a 6th field for seconds at the beginning.
Special Characters
* — any value (wildcard), — list separator: 1,15 means "1 and 15"- — range: 1-5 means "1 through 5"/ — step: */5 means "every 5"? — no specific value (used in some systems for day-of-month or day-of-week)L — last (e.g., L in day-of-month = last day of month)W — weekday nearest to the given day# — nth occurrence (e.g., 5#2 = second Friday)Common Schedule Examples
Every minute
* * * * *
Every 5 minutes
*/5 * * * *
Every hour (at minute 0)
0 * * * *
Every day at midnight
0 0 * * *
Every day at 9:30 AM
30 9 * * *
Every Monday at 8 AM
0 8 * * 1
Every weekday at 6 PM
0 18 * * 1-5
First day of every month at noon
0 12 1 * *
Every 15 minutes during business hours (9-5, Mon-Fri)
*/15 9-17 * * 1-5
Every quarter (Jan 1, Apr 1, Jul 1, Oct 1) at midnight
0 0 1 1,4,7,10 *
Twice a day (8 AM and 8 PM)
0 8,20 * * *
Platform-Specific Shorthand
Some platforms support predefined schedules:
@yearly or @annually — 0 0 1 1 *@monthly — 0 0 1 * *@weekly — 0 0 * * 0@daily or @midnight — 0 0 * * *@hourly — 0 * * * *Common Mistakes
Debugging Tips
Parse and validate your cron expressions with our Cron Expression Parser.
