Cron every 8 hours: 0 */8 * * *
0 */8 * * * runs three times a day at midnight, 08:00 and 16:00, which maps directly onto three eight hour shifts.
At a glance
- Expression
- 0 */8 * * *
- Fires
- 3 times a day, 21 times a week, 1,095 times in a non leap year.
- Restricted fields
- Minute pinned to 0, hour stepped by 8. Date fields open.
- Equivalent macro
- None.
- Hours matched
- 0, 8, 16.
- Shift alignment
- One run at the start of each of three eight hour shifts beginning at midnight.
In detail
Eight divides 24 three times, so the runs are exactly eight hours apart with no remainder. The set is small enough to hold in your head, which makes this a good schedule for anything a human is expected to check: three runs, three results, and a gap that matches how shift work is organised in most operations teams.
Because there are only three runs, each one carries a third of the day. That changes how failure should be handled. Silently retrying at the next schedule means eight hours of nothing, so a job on this cadence should retry internally, and it should report a failure loudly rather than relying on somebody noticing a missing log line.
The default alignment starts at midnight, which is rarely when a shift actually begins. Start at step handles this cleanly: 0 6-23/8 gives 06:00, 14:00 and 22:00, and 0 7-23/8 gives 07:00, 15:00 and 23:00. The spacing stays at eight hours in every case because the walk simply starts from a different hour.
One thing this schedule will not do is stay eight hours apart across a daylight saving change in an observing zone. The wall clock is what is matched, so the day the clock moves has one interval of seven or nine hours. If a downstream system genuinely requires eight hour spacing, run the crontab in UTC.
Examples
0 */8 * * *0 6-23/8 * * *Fires at 06:00, 14:00 and 22:00.
0 0,8,16 * * *Things that catch people out
- 0 8 * * * is once a day at eight in the morning. The step slash is what turns it into three runs.
- Three runs a day is not enough to hide a problem. If one fails, a third of the day's coverage is gone, so treat a single failure as an incident rather than as noise.
- 0 */8 * * * will not give you 08:00, 16:00 and 00:00 as separate calendar days in the way a shift roster does. The 00:00 run belongs to the day that is starting, not the one that is ending.
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 6 hours: 0 */6 * * *
0 */6 * * * fires four times a day at 00:00, 06:00, 12:00 and 18:00. Even spacing, quarter day alignment, and how to shift the whole set.
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 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 n/step: starting a step from a value you choose
The form 5/15 means start at 5 and step by 15, giving 5, 20, 35 and 50. It is how you move a repeating job off the crowded top of the hour.
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