To run a cron job every 4 hours, use 0 */4 * * *. For every 6 hours, use 0 */6 * * *; for every 3 hours, 0 */3 * * *; and for every 12 hours, 0 */12 * * *.
0 */4 * * * every 4 hours: 00:00, 04:00, 08:00, 12:00, 16:00, 20:00 0 */6 * * * every 6 hours: 00:00, 06:00, 12:00, 18:00 0 */3 * * * every 3 hours: 00:00, 03:00, 06:00 ... 21:00 0 */12 * * * every 12 hours: 00:00, 12:00
In a crontab:
0 */4 * * * /usr/local/bin/report.sh >> /var/log/report.log 2>&1
What each field means
| Field | Value | Meaning |
|---|---|---|
| Minute | 0 | at minute 0 |
| Hour | */4 | every 4th hour, starting at 0 |
| Day of month | * | every day |
| Month | * | every month |
| Day of week | * | every day of the week |
Change only the hour field for the other intervals.
Variants
| Schedule | Expression |
|---|---|
| Every 4 hours, starting at 2:00 | 0 2-23/4 * * * |
| Every 6 hours, starting at 3:00 | 0 3-23/6 * * * |
| Every 12 hours at 6:00 and 18:00 | 0 6,18 * * * |
| Every 4 hours on weekdays | 0 */4 * * 1-5 |
| Jenkins, every 4 hours on weekdays | H */4 * * 1-5 |
| Quartz, every 6 hours | 0 0 0/6 * * ? |
Spring @Scheduled, every 4 hours | 0 0 */4 * * * |
| AWS EventBridge | rate(4 hours), rate(6 hours) |
Platform notes
- Linux crontab: the hours are the server's local time.
- GitHub Actions: UTC unless you add
timezonewith an IANA name. Pick a minute other than 0 to avoid the busiest time. See GitHub Actions cron. - Kubernetes CronJob: set
.spec.timeZone, otherwise the hours follow the kube-controller-manager's time zone. - Cloudflare Cron Triggers: UTC, and intervals of an hour or longer get up to 15 minutes of CPU time on the Paid plan (as of October 2026).
- Vercel: Pro or Enterprise. Hobby allows one run a day, so every 12 hours needs Pro too.
- Jenkins:
H H/4 * * *keeps the 4-hour spacing at a stable per-job offset. See Jenkins cron.
Common mistakes
- Intervals that don't divide 24.
0 */5 * * *runs at 0, 5, 10, 15 and 20, then 0 again after a 4-hour gap. Only 1, 2, 3, 4, 6, 8 and 12 give even spacing. - A star in the minute field.
* */4 * * *runs every minute of every fourth hour, 360 times a day. - Assuming local time in a cloud scheduler that runs in UTC.
Running an AI agent every 4 hours
Every 4 or 6 hours suits agent reports that should refresh during the day without flooding you, like crash-free sessions from Sentry, which runs every 4 hours. The scheduled skills page shows how to put any skill on these schedules.
Questions
What times does 0 */6 * * * run?
At 00:00, 06:00, 12:00 and 18:00, in the scheduler's time zone. That is the server's local time for Linux cron and UTC by default for GitHub Actions, Cloudflare and Vercel.
How do I run every 6 hours starting at 3:00?
Use 0 3-23/6 * * * for 03:00, 09:00, 15:00 and 21:00, or write the hours out: 0 3,9,15,21 * * *.
Is 0 0,12 * * * the same as 0 */12 * * *?
Yes. Both run at midnight and noon. The list form is easier to read and to shift, for example 0 6,18 * * *.
How do I run every 5 hours exactly?
Cron can't, because 5 doesn't divide 24 and steps restart every day. Use a scheduler with fixed rates, such as AWS EventBridge rate(5 hours), or a loop that sleeps between runs.