Monitoring
Solutions
Resources
Free Tools
Pricing
Free Tools / SLOs & reliability / Heartbeat Interval Calculator

Heartbeat / dead man's switch calculator

Tell the calculator how often your job runs and how long it takes. It suggests the grace period for a heartbeat monitor and shows how late the alert can arrive.

Runs entirely in your browser — nothing you enter here is sent to a server.

How a heartbeat monitor works

Most monitoring asks a service "are you alive?". A heartbeat — also called a dead man's switch — reverses the direction: your job reports in after every successful run, and the monitor raises an alert when a report it expected does not arrive. It is the only practical way to watch things that have no address to check: cron jobs, backups, queue workers, scheduled imports.

Two settings decide how well it works. The period is how often a ping should arrive. The grace period is the extra time the monitor waits before declaring the job late. Too little grace and every slow run pages someone; too much and a dead job stays unnoticed for hours.

Grace covers variation

It should absorb the difference between a typical and a slow-but-normal run, plus any scheduling delay — not the whole run time.

Detection is not instant

A job that dies right after a successful ping is noticed only one full interval plus the grace period later. That is the worst case to plan for.

Ping on success only

If the job pings regardless of its exit code, a failing backup looks healthy forever. Chain the ping with &&.

Rare jobs need care

For a weekly job the worst-case detection is over a week. Add a start ping or a separate check on the job's output.

Avoiding false alerts

False heartbeat alerts almost always come from a grace period based on the average run rather than the slow one, or from network hiccups on the ping itself. Use the longest run you consider normal, add retries to the ping request, and keep "alert after missed runs" at 1 for anything important — tolerating a missed run doubles the time a real failure stays hidden.

Frequently asked questions

What is a dead man's switch in monitoring?

A check that expects a regular signal from a job and alerts when the signal stops. Silence is the failure condition, so it catches jobs that crash, hang or never start.

How long should the grace period be?

Long enough to cover the gap between a typical run and the slowest normal run, plus scheduling jitter and a small margin. For most jobs that is a few minutes, not a multiple of the interval.

How quickly will I know that a cron job failed?

At worst, one full interval plus the grace period after the last successful run. A job that runs hourly with a 5-minute grace is reported within 65 minutes.

Should the heartbeat be sent at the start or the end of the job?

At the end, after the work has succeeded. For long jobs send both: a start ping and a success ping let the monitor tell "did not start" from "started and hung".

Related free tools

A job that silently stops is the hardest outage to notice.

Upzilla's cron job monitor expects a ping from your task and alerts you when it does not arrive. 10 monitors free, no card required.

Start monitoring free →