/

Cron: Every 4 Hours

0 */4 * * * fires six times a day — midnight, 4 AM, 8 AM, noon, 4 PM, and 8 PM. Four is one of the most common hour-based intervals in production systems, striking a balance between the overhead of frequent polling and the staleness of once- or twice-daily jobs.

0 */4 * * *

Examples & Variations

0 */4 * * *

Every 4 hours, all day

Try it

0 8-20/4 * * *

Every 4 hours, 8 AM–8 PM only

Try it

30 */4 * * *

Every 4 hours, offset to :30

Try it

Common Mistakes

  • Assuming '4 hours' means 4 hours from whenever the job last ran — cron always anchors to midnight, so a manually-triggered run doesn't shift the schedule.
  • Running multiple unrelated 4-hour jobs all at :00 — six simultaneous invocations a day is enough to create a noticeable load spike if several heavy jobs share that exact schedule.
  • Not considering whether the underlying data actually changes on a 4-hour cadence — matching the job's frequency to the data's actual update rate avoids wasted work.

Best Practices

  • A dependable default for sync jobs, cache invalidation, and periodic reports where near-real-time freshness isn't required.
  • Offset the minute field (30 */4 * * * instead of 0 */4 * * *) if you need to avoid colliding with other jobs pinned to the top of the hour.
  • Six runs a day is frequent enough to catch problems within a reasonable window — pair with basic failure alerting for anything business-relevant.

Frequently Asked Questions

What times does every 4 hours run at?
Midnight, 4 AM, 8 AM, noon, 4 PM, and 8 PM — six evenly-spaced runs starting from hour 0.
Why is every 4 hours such a common default?
It divides the day into a manageable number of checkpoints (6) without the overhead of hourly runs, making it a practical middle ground for periodic maintenance and sync tasks across many platforms and tools.
How do I shift every-4-hours to start at 2 AM instead of midnight?
Use an explicit list instead of a step: 0 2,6,10,14,18,22 * * * keeps the same 4-hour spacing but starts at 2 AM.