How long should the grace time be?
On this page
The grace time is how long a ping may be late before CronMissed alerts. Make it long enough for a slow day and short enough that a real miss is reported while it still matters. A good start is the larger of 5 minutes and 1.5 times the usual run time, never more than half the interval.
What rule does CronMissed suggest?
The snippet builder and the MCP tool suggest the larger of 5 minutes and 1.5 times the typical run time, at most half the interval, rounded up to a whole minute and never under 1 minute. The table shows what it gives:
| Job | Interval | Typical run time | Suggested grace |
|---|---|---|---|
| Heartbeat from a worker | 1 minute | under a second | 1 minute |
| Poller | 5 minutes | 20 seconds | 150 seconds |
| Hourly import | 60 minutes | 4 minutes | 6 minutes |
| Nightly backup | 1440 minutes | 10 minutes | 15 minutes |
| Large weekly export | 10080 minutes | 90 minutes | 135 minutes |
When should the grace be longer?
- The scheduler runs late by design. Vercel Hobby can start a daily job any time within the hour, and GitHub Actions can delay schedules at the top of the hour.
- The job waits in a queue before it starts, as Celery and Sidekiq tasks do.
- The run time varies a lot, for example a backup after a large change.
- The machine is not always on, such as a laptop or a workstation.
When should it be shorter?
When the alert is only useful if it is quick: a payment run that must finish before a cut-off, or a sync that feeds a live dashboard. Add a start ping and let the check watch the run time, instead of widening the grace to fit the slowest night.
How do I tune it?
- Start with the suggestion.
- After a week, open the ping log and look at how late the latest pings were compared with the schedule.
- Set the grace to about twice the worst normal lateness you saw.
- Revisit after the job changes, grows or moves to another host.
Questions and answers
- A check is late between the expected time and the end of the grace. It sends no alert. It goes down when the grace is over, and the alert goes out then.
- Yes. Both the period and the grace have a minimum of 60 seconds, so no check reacts faster than a minute.
What is the difference between late and down?
Is there a minimum?
Create a check, add one curl to the job, and CronMissed alerts you when a ping is late or reports a failure.
Start monitoring