Cron every 6 hours: 0 */6 * * *
0 */6 * * * runs four times a day at midnight, 06:00, midday and 18:00. Six divides 24 exactly, so the spacing never varies.
At a glance
- Expression
- 0 */6 * * *
- Fires
- 4 times a day, 28 times a week, 1,460 times in a non leap year.
- Restricted fields
- Minute pinned to 0, hour stepped by 6. Date fields open.
- Equivalent macro
- None.
- Hours matched
- 0, 6, 12, 18.
- Quarter day alignment
- One run per six hour quarter of the day, starting at midnight.
In detail
Four runs a day at the quarter points is the most common multi hour schedule after hourly, and for good reason: it lines up with how people talk about the day. Midnight, breakfast, midday, evening. Six divides 24 exactly so there is no boundary gap, and each run has a full six hours to finish before the next one is due.
The generous window is the reason to prefer this over something more frequent for anything expensive. A six hour budget covers a full export, a database vacuum, a large upload and a verification pass, and if one run overruns by twenty minutes nothing collides. It is also long enough that a lock is genuinely useful, because an overrun that does collide will be a bad one.
The midnight run is the awkward one. It shares its slot with log rotation, certificate renewal, backup jobs and everything else that defaults to the start of the day. Moving the set with 0 3-23/6 gives 03:00, 09:00, 15:00 and 21:00, which keeps the six hour spacing and steps clear of the nightly rush entirely.
Four runs a day also makes daily reconciliation easy: if the job writes one summary row per run, a day with fewer than four rows is a day that needs looking at. That check is only reliable in a fixed offset timezone, because a daylight saving change can legitimately produce three or five.
Examples
0 */6 * * *0 3-23/6 * * *Fires at 03:00, 09:00, 15:00 and 21:00.
0 0,6,12,18 * * *Things that catch people out
- 0 */6 * * * and 0 6 * * * differ by two characters and by a factor of four. The second runs once a day at six in the morning.
- A six hour job on a six hour schedule has no slack at all. If the runtime is creeping up, the schedule will start overlapping before anybody notices the trend.
- Four runs a day makes each failure a quarter of the day's work. Alert on a failed run rather than on a daily summary that would hide three successes.
Try it: Cron Expression Parser
Paste any five or six field expression to get a plain English description, a per field breakdown and the next run times in your local time.
Cron Expression Parser
LOCAL · Browser-OnlyParse cron expressions and see the next scheduled run times
Supports 5-field (minute hour day month weekday), 6-field (with seconds), named values (JAN, MON), and @macros (@daily, @hourly, ...)
Use the dropdowns below to build your cron expression visually, or type a custom value in each field.
Human-Readable Description
Every 5 minutes
Field Breakdown
| Field | Allowed | Value | Meaning |
|---|---|---|---|
| Minute | 0-59 | */5 | every 5 minute(s) |
| Hour | 0-23 | * | every hour |
| Day of Month | 1-31 | * | every day of month |
| Month | 1-12 | * | every month |
| Day of Week | 0-7 | * | every day of week |
Related cron expressions
All cron expressions →Cron every 4 hours: 0 */4 * * *
0 */4 * * * fires six times a day at 00:00, 04:00, 08:00, 12:00, 16:00 and 20:00. Even spacing, and how to move the set off midnight.
Cron every 8 hours: 0 */8 * * *
0 */8 * * * fires three times a day at 00:00, 08:00 and 16:00. Shift aligned, evenly spaced, and easy to move with a start at step form.
Cron every 12 hours: 0 */12 * * *
0 */12 * * * fires twice a day, at 00:00 and 12:00. Identical to 0 0,12 * * *, and different from an arbitrary twice daily schedule.
Cron every 3 hours: 0 */3 * * *
0 */3 * * * fires eight times a day at 00:00, 03:00, 06:00 and on to 21:00. Three divides 24 exactly, so the midnight gap is the same as the rest.
Cron every day at midnight: 0 0 * * *
0 0 * * * runs once a day at 00:00 and is what both @daily and @midnight expand to. The midnight pile up, and why 0 24 * * * is invalid.
Cron every day at 2 AM: 0 2 * * * and daylight saving
0 2 * * * runs once a day at 02:00, the hour many timezones use for daylight saving transitions. What happens when 02:00 is skipped or repeated.
Tools for this
- Cron Expression Parser Free online cron expression parser - parse cron expressions and see the next scheduled run times
- Crontab Generator Free online crontab generator - build cron expressions visually with an intuitive interface