Every 8 Hours
0 */8 * * * 0 0 */8 * * ? 0 */8 * * * 0 */8 * * ? * 0 0 */8 * * * 0 */8 * * * Runs every 8 hours at the top of the hour — 00:00, 08:00, 16:00. 3 invocations per day, aligned to 8-hour shifts.
Use in your stack
# Run every 8 hours
0 */8 * * * /usr/local/bin/shift-job.sh
{ "cron": "0 0 */8 * * ?", "timezone": "UTC" }
apiVersion: batch/v1
kind: CronJob
metadata:
name: eight-hourly
spec:
schedule: "0 */8 * * *"
timeZone: "UTC"
jobTemplate:
spec:
template:
spec:
containers:
- name: job
image: my-image:latest
restartPolicy: OnFailure
cron(0 */8 * * ? *)
@Scheduled(cron = "0 0 */8 * * *", zone = "UTC")
public void every8Hours() { /* ... */ }
on:
schedule:
- cron: '0 */8 * * *'
Next runs
Pick a timezone to see when this expression fires next.
- 012026-07-14T00:00:00.000Z
- 022026-07-14T08:00:00.000Z
- 032026-07-14T16:00:00.000Z
- 042026-07-15T00:00:00.000Z
- 052026-07-15T08:00:00.000Z
- 062026-07-15T16:00:00.000Z
- 072026-07-16T00:00:00.000Z
- 082026-07-16T08:00:00.000Z
- 092026-07-16T16:00:00.000Z
- 102026-07-17T00:00:00.000Z
Variations
Common use cases
- Once-per-shift jobs on a three-shift (8-hour) operations schedule.
- Thrice-daily batch processing or summary rollups.
- Refreshing credentials or caches with an ~8-hour lifetime.
- Periodic backups that don't need hourly granularity.
Gotchas
- `*/8` on the hour field fires at 0, 8, 16 — the next step (24) is out of the 0–23 range, so it wraps to the next day's 00:00. Spacing stays an even 8 hours.
- AWS EventBridge: `0 */8 * * ? *`. Quartz: `0 0 */8 * * ?` (seconds field first).
- Aligns to UTC midnight by default. If your shifts are defined in a local timezone, pin `timeZone`/`zone` explicitly or the runs drift off shift boundaries.
0 */8 * * * is the thrice-daily, once-per-shift cadence — runs at 00:00, 08:00, and 16:00. Because 24 divides evenly by 8, the three runs stay exactly 8 hours apart, wrapping cleanly at midnight.
The step syntax */8 expands to the list 0,8,16. The hour field counts 0–23, so there’s no run at “24” — it becomes the next day’s 00:00, preserving the even spacing. This makes the expression a good match for three-shift operations, but only if the timezone is right: cron uses UTC by default, so pin timeZone (Kubernetes) or zone (Spring) to the zone your shifts are defined in. Need the runs offset from midnight? Use an explicit list like 0 6,14,22 * * *. For a denser cadence see every 4 hours or every 6 hours; for sparser, every 12 hours.
Frequently asked questions
What does `0 */8 * * *` mean?
Why does every 8 hours only run 3 times a day?
Is `0 */8 * * *` good for a three-shift schedule?
How do I run every 8 hours starting at 06:00?
Browse all cron patterns
Every schedule Cronuru documents, with its expression and code snippets for six dialects.