cronuru
Pattern

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.

Next 10 runs
  1. 012026-07-14T00:00:00.000Z
  2. 022026-07-14T08:00:00.000Z
  3. 032026-07-14T16:00:00.000Z
  4. 042026-07-15T00:00:00.000Z
  5. 052026-07-15T08:00:00.000Z
  6. 062026-07-15T16:00:00.000Z
  7. 072026-07-16T00:00:00.000Z
  8. 082026-07-16T08:00:00.000Z
  9. 092026-07-16T16:00:00.000Z
  10. 102026-07-17T00:00:00.000Z

Variations

0 */6 * * *

Every 6 hours

0 */4 * * *

Every 4 hours

0 */12 * * *

Every 12 hours

0 0,12 * * *

Twice daily

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?
Minute `0` and hour `*/8` mean "at minute 0 of every 8th hour starting from 0." The job fires at 00:00, 08:00, and 16:00 — 3 invocations per day, evenly spaced 8 hours apart.
Why does every 8 hours only run 3 times a day?
24 ÷ 8 = 3. The runs land at 0, 8, and 16; the next step (24) is the following day's 00:00, so you get three runs per day with an even 8-hour gap across the day boundary.
Is `0 */8 * * *` good for a three-shift schedule?
Yes — 00:00, 08:00, and 16:00 line up with the classic three 8-hour shifts. Just make sure the timezone matches where the shifts are defined: cron aligns to UTC by default, so set `timeZone` (Kubernetes) or `zone` (Spring) to your local zone if the shift boundaries are local.
How do I run every 8 hours starting at 06:00?
Use an explicit list: `0 6,14,22 * * *` (06:00, 14:00, 22:00), or the offset range `0 6-23/8 * * *`. Both keep the 8-hour spacing but shift the first run to 06:00 instead of midnight.

Browse all cron patterns

Every schedule Cronuru documents, with its expression and code snippets for six dialects.