Cron: Every 12 Hours
0 */12 * * * fires twice a day, at midnight and noon — the largest even hour-step short of once daily. It's the schedule behind most 'twice a day' automation: medication reminders, AM/PM reports, and sync jobs that need morning and evening coverage without full hourly polling.
0 */12 * * *
Examples & Variations
Common Mistakes
- Assuming every-12-hours automatically means 'morning and evening' in a user-friendly sense — the default midnight/noon split isn't when most people want a reminder or report; use an explicit list for meaningful times.
- Using this interval when 'twice daily' framing (see the dedicated Twice Daily page) would be clearer to whoever reads the crontab later — both produce the same schedule, but explicit hours read better.
- Forgetting that exactly 2 runs a day means a single missed execution is a 50% gap in that day's coverage — worth monitoring for anything important.
Best Practices
- For anything user-facing (reminders, digests), pick explicit AM/PM hours (like 8,20) rather than the midnight/noon default, which rarely matches when people actually want to be reached.
- This is a reliable, low-overhead cadence for sync jobs and reports that need same-day but not real-time freshness.
- Add basic run-tracking or alerting given how few checkpoints exist per day — a silent failure here is proportionally more significant than in a high-frequency schedule.
Frequently Asked Questions
- Is 0 */12 * * * the same as twice-daily?
- They produce the same two-runs-per-day pattern, but 'twice daily' typically implies specific meaningful hours (like 8 AM and 8 PM) rather than the step form's default midnight/noon split — see the dedicated Twice Daily page for that framing.
- How do I run every 12 hours at 9 AM and 9 PM instead of midnight/noon?
- Use an explicit list: 0 9,21 * * * — the step syntax always starts at 0, so a custom offset needs the list form instead.
- Is every 12 hours enough for a backup schedule?
- For many workloads, yes — it roughly halves the potential data loss window compared to a single daily backup, without the overhead of more frequent snapshots.
Related Tools
Cron Parser
Translate cron expressions to plain English
Cron Cheat Sheet
Quick reference for cron syntax, special characters, and shortcuts
Cron Examples Library
Browse and search common cron expression examples
Cron: Every 8 Hours
The cron expression for every 8 hours is 0 */8 * * *, firing 3 times a day — matching a classic 8-hour shift pattern. See examples and best practices.
Cron: Twice Daily
Run a cron job twice a day with 0 8,20 * * * or similar — see common AM/PM patterns, examples, and best practices for twice-daily schedules.
Cron: Every Weeknight
The cron expression for every weeknight is 0 18 * * 1-5, running weekday evenings only. See examples, mistakes, and best practices.