Cron Expression
* * * * *
minute hour day/month month day/week
Minute
0–59
0–59
Hour
0–23
0–23
Day (month)
1–31
1–31
Month
1–12
1–12
Day (week)
0–6 (Sun=0)
0–6 (Sun=0)
Quick presets
Expression details (click to copy)
Frequently Asked Questions
What is a cron expression?
A cron expression is a string of 5 fields that define a schedule for automated tasks. The fields represent: minute (0–59), hour (0–23), day of month (1–31), month (1–12), and day of week (0–6, where 0 = Sunday). Cron jobs run automatically when the server clock matches the expression.
What does * mean in cron?
An asterisk (*) means 'every possible value' for that field. For example, '* * * * *' runs every minute of every hour of every day. '0 * * * *' runs at minute 0 of every hour (i.e., every hour on the hour).
How do I run a job every 5 minutes?
Use the step operator: '*/5 * * * *'. The slash means 'every N units'. */5 in the minute field = every 5 minutes. */2 in the hour field = every 2 hours. You can combine: '*/15 9-17 * * 1-5' = every 15 minutes during business hours on weekdays.
What is the difference between day-of-month and day-of-week?
Day-of-month (field 3) specifies which day number in the month (1–31). Day-of-week (field 5) specifies which day of the week (0–6). Most cron implementations trigger if either condition matches when both are specified (OR logic, not AND).
Where can I use cron expressions?
Cron expressions are used in Linux/Unix crontab, AWS Lambda scheduled events, Kubernetes CronJobs, GitHub Actions scheduled workflows, Node.js libraries (node-cron), Python (APScheduler), database scheduled tasks, and CI/CD pipeline triggers.
How do I run a job on the last day of the month?
Standard cron doesn't support 'last day of month' directly. A common workaround: schedule for day 28-31 and add a shell condition checking if tomorrow is month 1. Some extended cron implementations (like Quartz) support the L character for 'last'.