Run a Cron Job Every 8 Hours
0 */8 splits the day into three equal parts, firing at 00:00, 08:00 and 16:00. It fits jobs that follow a three-shift rhythm, or anything that should run a few times a day without bunching up.
0 */8 * * *In plain English: At minute 0, every 8 hours.
Field by field
| Field | Value | Meaning |
|---|---|---|
| Minute | 0 | 0 |
| Hour | */8 | every 8 hours |
| Day of month | * | every day |
| Month | * | every month |
| Day of week | * | every weekday |
Variations
0 6,14,22 * * *aligned to shift changes at 06:00, 14:00 and 22:000 2-23/8 * * *offset to 02:00, 10:00 and 18:000 */8 * * 1-5every 8 hours on weekdays onlyTweak any of these in the crontab explainer to see the schedule in plain English and its next run times.
Frequently asked questions
Can I schedule every 5 hours?
Not evenly. 0 */5 * * * runs at 00:00, 05:00, 10:00, 15:00 and 20:00, then again at 00:00 — a 4-hour gap. Only steps that divide 24 (1, 2, 3, 4, 6, 8, 12) keep a constant interval.
Is 0 */8 * * * the same as 0 0,8,16 * * *?
Yes. The step is shorthand for that explicit list; use whichever reads more clearly to your team.
New to cron syntax? Read Cron Expressions Explained, Field by Field. Job not firing? Work through Cron Job Not Running? 10 Things to Check.