Cron Schedules for Health Checks
Uptime and health check jobs must run frequently enough to catch outages quickly without overwhelming servers with unnecessary requests. This set ranges from every minute for critical endpoints to every five minutes for secondary checks and hourly for full smoke tests. The cron parser confirms exactly when each expression fires so you can calculate your maximum detection lag. Pair with alerting to be notified within your SLA window.
Example
* * * * * */2 * * * * */5 * * * * */10 * * * * 0 * * * * 0 */4 * * * 0 9,13,17 * * 1-5 */3 * * * *
FAQ
- How often should I run health checks?
- Critical APIs and payment flows benefit from every-minute checks. Secondary services can be checked every 5–10 minutes. Balance check frequency against the cost of the check itself.
- What is the minimum cron interval?
- Standard cron supports a minimum interval of one minute. For sub-minute monitoring, use a dedicated uptime service like Pingdom or UptimeRobot which poll every 30 seconds.
- Can I run a check at multiple specific times?
- Yes. Use a comma-separated list in any field. For example, 0 9,13,17 * * 1-5 fires at 9 AM, 1 PM, and 5 PM on weekdays.
Related Examples
Common Cron Schedule Examples
Cron expressions can be intimidating at first, but most production systems rely ...
Cron Schedules for Business HoursMany jobs should only run when people are at work — report emails, Slack digests...
Cron Schedules for DeploymentsScheduled deployments reduce risk by ensuring releases happen at low-traffic tim...