Cron syntax
A standard cron expression has five fields separated by spaces:
┌───────── minute (0–59)
│ ┌─────── hour (0–23)
│ │ ┌───── day of month (1–31)
│ │ │ ┌─── month (1–12 or JAN–DEC)
│ │ │ │ ┌─ day of week (0–6, Sunday = 0, or SUN–SAT)
* * * * *
| Symbol | Meaning | Example |
|---|---|---|
* | Every value | * * * * * — every minute |
, | List | 0 8,12,18 * * * — 8 AM, noon, 6 PM |
- | Range | 0 9 * * 1-5 — 9 AM Mon–Fri |
/ | Step | */10 * * * * — every 10 minutes |
@daily etc. | Shortcuts | @hourly, @weekly, @monthly, @yearly, @reboot |
Common cron examples
| Expression | Runs |
|---|---|
*/5 * * * * | Every 5 minutes |
0 */2 * * * | Every 2 hours, on the hour |
30 2 * * * | Every day at 2:30 AM |
0 9 * * 1 | Every Monday at 9 AM |
0 0 1,15 * * | At midnight on the 1st and 15th |
0 0 * * 6,0 | Midnight on weekends |
Gotchas
- Day of month and day of week: when both are restricted, standard cron runs when either matches —
0 0 13 * 5runs on every 13th and every Friday. - Time zone: cron runs in the server’s time zone, often UTC. The next-run preview uses your browser’s time; convert with the time zone converter.
- Six-field formats: Quartz (Java) and some cloud schedulers add a seconds field at the start, and AWS EventBridge adds a year field. This tool uses the standard 5-field Unix/Linux format used by crontab, GitHub Actions and Kubernetes CronJobs.
Frequently asked questions
What does */5 mean in cron?
Every 5 units of that field — in the minute field, every 5 minutes.
How do I run a cron job every day at midnight?
Use 0 0 * * * (or @daily).
Is Sunday 0 or 7 in cron?
Both work in most cron versions: 0 and 7 both mean Sunday.
Which time zone does cron use?
The server’s system time zone, which is often UTC.