Cron expression: every 3 hours
0 */3 * * *
Runs 8 times a day, at 00:00, 03:00, 06:00, 09:00, 12:00, 15:00, 18:00, 21:00.
What each field means
| Field | Value | Meaning |
|---|---|---|
| minute | 0 | minute 0 |
| hour | */3 | every 3 hours |
| day of month | * | every day of month |
| month | * | every month |
| day of week | * | every day of week |
Next runs
Starting from 1 January 2026, 00:00 UTC:
- Thursday 1 Jan 00:00
- Thursday 1 Jan 03:00
- Thursday 1 Jan 06:00
- Thursday 1 Jan 09:00
- Thursday 1 Jan 12:00
- Thursday 1 Jan 15:00
Things to watch
The step restarts at midnight each day, so the interval is even as long as 3 divides into 24 — which it does here.
This fires 8 times a day, once every 3 hours. That number is worth looking at before anything else: whatever the job costs — a database query, an API call, a container start — multiply it by 8 and check the result is one you are willing to pay every day.
At this spacing a run has a wide margin before the next one, so overlap is rarely the concern. The thing to check instead is what happens when one run is missed entirely — a machine reboot at the wrong moment means the gap is doubled, and if each run assumes it is processing exactly 3 hours of data, that assumption is now wrong.
The same schedule elsewhere
# crontab
0 */3 * * * /usr/local/bin/my-job >> /var/log/my-job.log 2>&1
# GitHub Actions (.github/workflows/job.yml) — always UTC
on:
schedule:
- cron: '0 */3 * * *'
# Kubernetes CronJob
spec:
schedule: "0 */3 * * *"
# AWS EventBridge — six fields, and ? in one of the day fields
cron(0 */3 * * ? *)
Frequently asked questions
What is the cron expression to run a job every 3 hours?
0 */3 * * * — Runs 8 times a day, at 00:00, 03:00, 06:00, 09:00, 12:00, 15:00, 18:00, 21:00.
Which time zone does cron use?
The server's local time zone, unless the scheduler says otherwise. GitHub Actions always uses UTC. Kubernetes CronJobs use UTC unless you set spec.timeZone. Running servers in UTC and converting only for display avoids an entire class of daylight-saving bugs.
What happens if the previous run is still going?
Standard cron starts a new one regardless, so long-running jobs can pile up. Wrap the command in flock -n /var/lock/my-job.lock, or set concurrencyPolicy: Forbid on a Kubernetes CronJob.
Why did my cron job not run at all?
The three usual causes: the script is not executable, the command relies on a PATH or environment variable that cron does not set, or output went nowhere because no mail transport is configured. Redirect stdout and stderr to a log file and the reason usually becomes obvious.
Other schedules
- every 4 hours
- every 6 hours
- every 8 hours
- every 12 hours
- every day at 00:00
- every day at 01:00
- every day at 02:00
- every day at 03:00
- every day at 04:00
- every day at 05:00
- every day at 06:00
- every day at 07:00
- every day at 08:00
- every day at 09:00
- every day at 10:00
- every day at 11:00
- every day at 12:00
- every day at 13:00
- every day at 14:00
- every day at 15:00