Cron: Every 6 Hours
0 */6 * * * fires four times a day — midnight, 6 AM, noon, and 6 PM. It's a common choice for periodic backups, digest generation, and sync jobs that need to run more than once daily but don't need hourly attention.
0 */6 * * *
Examples & Variations
Common Mistakes
- Confusing 'every 6 hours' with 'four times a day at hours I choose' — the step form always includes midnight and spaces evenly from there; use an explicit list if you need different specific hours.
- Running heavy batch jobs at all four slots without staggering, causing the same load spike four times a day instead of once.
- Overlooking that this interval crosses both AM and PM — a job assuming 'business hours only' behavior needs an explicit hour range, not just the step value.
Best Practices
- Solid default for quarter-day summaries, periodic backups, or sync jobs where 4 checkpoints a day is enough coverage.
- Use 0,6,12,18 explicitly if the exact hours matter to readers of the crontab and you want to avoid step-syntax mental math.
- Restrict to weekdays (add * * 1-5) for anything tied to business operations that shouldn't run on weekends.
Frequently Asked Questions
- What four times does every 6 hours run?
- Midnight, 6 AM, noon, and 6 PM — a quarter-day cadence starting from hour 0.
- Is every 6 hours a good interval for backups?
- Yes, it's a common choice for systems that want more frequent recovery points than a single daily backup without the overhead of hourly snapshots.
- How do I run every 6 hours but only on weekdays?
- Add a day-of-week restriction: 0 */6 * * 1-5 keeps the 6-hour cadence but skips Saturday and Sunday entirely.