Cron syntax
Special characters
| Symbol | Meaning | Example |
|---|---|---|
| * | Every value | * in hour = every hour |
| , | A list | 0,30 = at :00 and :30 |
| - | A range | 1-5 = Monday to Friday |
| / | Every n-th value | */15 = every 15 minutes |
| @daily etc. | Shortcuts | @hourly, @daily, @weekly, @monthly, @yearly |
Common schedules
| Expression | Runs |
|---|---|
| */5 * * * * | Every 5 minutes |
| 0 * * * * | At the start of every hour |
| 0 0 * * * | Every day at midnight |
| 0 9 * * 1 | Every Monday at 9:00 |
| 0 0 1 * * | At midnight on the 1st of every month |
| 0 */6 * * * | Every 6 hours (00:00, 06:00, 12:00, 18:00) |
| 15 14 1 * * | At 14:15 on the 1st of each month |
| 0 22 * * 1-5 | At 10 pm on weekdays |
The day-of-month and day-of-week rule
When both day fields are restricted, standard cron runs when either one matches, not both. 0 0 13 * 5 runs on every 13th and every Friday, not only on Friday the 13th. The next-run list above follows this rule, so you can check what will really happen.
Where cron expressions are used
- Linux crontab: edit with
crontab -e, then a line like30 9 * * 1-5 /home/me/backup.sh. - GitHub Actions:
on: schedule: - cron: '30 9 * * 1-5'. Always UTC, and runs can be delayed at busy times. - Kubernetes CronJobs, cPanel cron jobs, cloud schedulers and CI tools.
Some systems add extras: Quartz and Spring use a 6th field for seconds and support L (last), W (weekday) and # (nth weekday). The checker here follows standard 5-field cron and tells you if it sees those extensions.
Time zones
Cron runs in the server's time zone, which is very often UTC. A job set for 0 9 * * * on a UTC server runs at 9:00 UTC: that's 10:00 in London in winter, 4 or 5 am in New York, and 2:30 pm in India. The next runs above are shown in your own time zone, so if your server uses UTC, adjust the hour.
Frequently asked questions
How do I run a cron job every 5 minutes?
Use */5 * * * *. The */5 in the minute field means every fifth minute.
What does * * * * * mean in cron?
Run every minute of every hour of every day.
What time zone does cron use?
The server’s time zone, often UTC. GitHub Actions schedules always use UTC.
Is Sunday 0 or 7 in cron?
Both. 0 and 7 both mean Sunday in standard cron.
Why does my cron run on more days than expected?
If both day-of-month and day-of-week are set, cron runs when either matches. Set one of them to * to limit it.
Last updated October 2026 · More developer tools