CronVibe logo CronVibe Cron Expression Studio
--:--:--

Cron Every 8 Hours: 0 */8 * * *

At minute 00 past every 8 hours. On the days it matches that means 3 runs per day, or roughly 1,095 a year. Below are the field-by-field reading, the exact minutes it lands on, and ready-to-paste blocks for crontab, Kubernetes and GitHub Actions.

Fires per run day31 min × 3 h
Matching days / year365non-leap reference year
Fires per year1,095about 21 per week

The five fields, one at a time

Cron reads left to right, from the finest unit to the coarsest. This expression fills them like so:

FieldTokenWhat it means
Minute00
Hour*/8every 8 hours — 0, 8, 16
Day of month*every day of the month
Month*every month of the year
Day of week*every day of the week

The exact minutes it fires

Because the minute field resolves to 1 specific value, each hour has 1 trigger point: :00.

Everything in this schedule is anchored to the top of the hour. If the box also runs other jobs at :00, shift this one with a range like 2-59/5 instead of */5 — same cadence, no thundering herd.

Paste it in

crontab -e
0 */8 * * *  /usr/bin/env bash /opt/jobs/every-8-hours.sh >> /var/log/every-8-hours.log 2>&1
Kubernetes CronJob
apiVersion: batch/v1
kind: CronJob
metadata:
  name: every-8-hours
spec:
  schedule: "0 */8 * * *"
  concurrencyPolicy: Forbid
  jobTemplate:
    spec:
      template:
        spec:
          restartPolicy: Never
          containers:
            - name: every-8-hours
              image: alpine:3.20
              command: ["/bin/sh", "-c", "echo running every-8-hours"]
GitHub Actions
on:
  schedule:
    - cron: '0 */8 * * *'
jobs:
  run:
    runs-on: ubuntu-latest
    steps:
      - run: echo "running every-8-hours"

Before you ship it

  • Absolute paths only. Cron does not read your shell profile, so relative commands and $PATH lookups fail silently.
  • Stars mean "every value", not "ignore the field". A * still participates in matching; it just matches everything.
  • Overlap protection. A run that takes longer than the gap will stack. Add flock -n for shell jobs, or concurrencyPolicy: Forbid in Kubernetes.
  • Log something. Cron mails output to a mailbox nobody reads; redirect to a file and rotate it.

Frequently asked

What is the cron expression for every 8 hours?
It is 0 */8 * * *. The engine reads it as: At minute 00 past every 8 hours. On a day the schedule matches, it fires 3 times, and across a calendar year it fires about 1,095 times.

How many times a day does every 8 hours run?
On the days it is allowed to run, 3 times: 1 trigger point per hour across 3 hours of the day. Because the schedule matches 365 days in a non-leap year, the yearly total is 1,095.

Why does the job still fail with 0 */8 * * * in crontab?
Almost always the environment, not the schedule. Cron runs with a near-empty PATH and no shell profile, so node, python3 or docker resolve to nothing. Use absolute paths, and redirect both streams (>> /var/log/job.log 2>&1) so a silent failure leaves a trace.

Does every 8 hours still fire during a daylight-saving change?
Yes, with a caveat. When clocks spring forward the skipped wall-clock times simply do not occur that day, and when they fall back an hourly job can run twice. For jobs where a double run is harmful, guard the body with a lock file or an idempotency key rather than relying on cron to fire exactly once.

Other schedules in the library