The expression
0 */6 * * *
Runs at minute 0 of hours 0, 6, 12 and 18: 00:00, 06:00, 12:00 and 18:00, four times a day.
| Field | Value | Meaning |
|---|---|---|
| Minute | 0 |
at minute 0 |
| Hour | */6 |
every 6th hour, starting at 0 |
| Day of month | * |
every day |
| Month | * |
every month |
| Day of week | * |
every day of the week |
*/6 is the list 0,6,12,18, so 0 0,6,12,18 * * * is identical. The schedule is tied to the clock and restarts at midnight each day.
Variants
| Schedule | Expression |
|---|---|
| Every 6 hours from 3:00 (3, 9, 15, 21) | 0 3-23/6 * * * |
| Every 6 hours at 45 past | 45 */6 * * * |
| Every 6 hours, weekdays only | 0 */6 * * 1-5 |
| Every 4 hours | 0 */4 * * * |
| Every 12 hours | 0 */12 * * * |
| Once a day at midnight | 0 0 * * * |
Uneven steps
A step in the hour field always starts over at 0 the next day. 0 */6 works because 24 is a multiple of 6. 0 */7 * * * looks like "every 7 hours" but runs at 0, 7, 14 and 21, and then 00:00 comes after only 3 hours. 0 */5 * * * (0, 5, 10, 15, 20) ends the day with a 4-hour gap. For a real fixed interval that ignores the day boundary, use a systemd timer (OnUnitActiveSec=7h) or AWS rate(7 hours).
Where to write it
- crontab (Linux, macOS):
0 */6 * * * /usr/local/bin/backup.shincrontab -e, in the server's time zone. - GitHub Actions:
on: schedule: - cron: '0 */6 * * *'. UTC; runs at minute 0 can be delayed under load, so an odd minute is safer. This is a common choice for dependency or link checks. - Kubernetes CronJob:
schedule: "0 */6 * * *", withtimeZone:if the four times should be local. - AWS EventBridge:
cron(0 0/6 * * ? *)(six fields,?in day of week) orrate(6 hours), which counts from rule creation.
Common mistakes
0 6 * * *runs once a day at 06:00, not every 6 hours.*/6 * * * *is every 6 minutes.* */6 * * *runs 60 times during each of the four matching hours.- Daylight saving. In a DST zone, the gap across the change is 5 or 7 hours of real time. Schedule in UTC if the interval must be exact.
Paste any expression into the Cron Expression Parser to see it in words and its next run times.