Build the crontab line that pings your heartbeat URL each time a job succeeds, and reports a failure straight away when it doesn't. You also get the period and grace time to set on the heartbeat monitor, and a wrapper script to download.
Made for Edesy OnCall heartbeat monitors, which phone you when a ping is late. Full reference: heartbeat monitors.
Copy it from your heartbeat monitor's page in Edesy OnCall. Left empty, the lines use a placeholder you can replace later. Keep the real URL private.
The ping is sent when the job finishes, so the grace period has to cover a slow run.
When the command fails, call the URL with status=fail so you are phoned at once instead of when the ping is late.
Shown in the incident. Avoid the % sign: cron treats it as a new line.
Replace YOUR_TOKEN with the token from your OnCall heartbeat monitor before you save the crontab.
Your crontab line
| Paste into crontab -e |
|---|
| 0 2 * * * if /usr/local/bin/backup.sh; then curl -fsS -m 10 --retry 3 https://oncall.edesy.in/hb/YOUR_TOKEN > /dev/null; else curl -fsS -m 10 -G --data-urlencode status=fail --data-urlencode "msg=job failed" https://oncall.edesy.in/hb/YOUR_TOKEN > /dev/null; fi |
Set the heartbeat monitor in OnCall to
Or wrap the job in a script
| heartbeat-wrapper.sh |
|---|
| #!/bin/sh if /usr/local/bin/backup.sh; then curl -fsS -m 10 --retry 3 https://oncall.edesy.in/hb/YOUR_TOKEN > /dev/null else curl -fsS -m 10 -G --data-urlencode status=fail --data-urlencode "msg=job failed" https://oncall.edesy.in/hb/YOUR_TOKEN > /dev/null fi |
-f makes curl fail on HTTP errors, -m 10 stops it hanging, and --retry 3 rides out a brief network blip. The failure ping uses --data-urlencode, so the message needs no escaping and the line has no % sign.
Get a phone call when a job doesn't run (free for 3 monitors)In Edesy OnCall, add a Heartbeat monitor and copy its URL.
Pick how often it runs, its longest run time and the command.
Run crontab -e and paste the line, or download the wrapper script.
Use the suggested period and grace on the monitor so slow runs don't call you.
A secret URL your job calls every time it runs. A heartbeat monitor watches for the call and raises an alert when it doesn't arrive within the expected period plus a grace time. It catches jobs that never started, crashed or hung, which an uptime check can't see.
Because a ping at the start says the job began, not that it worked. Chaining the ping with && (or putting it in the success branch) means a failed job sends no ping, and the monitor alerts you.
Cron treats an unescaped % in a crontab line as a new line, which breaks the command. The generated line uses curl -G --data-urlencode, so curl adds the encoding at run time and the crontab line stays free of % signs.
The ping arrives when the job finishes, so the grace has to cover the job's longest run plus a margin. The tool suggests one and a half times the longest run time, with a minimum of 2 minutes.
Not with an Edesy OnCall heartbeat today. The longest expected period is 24 hours, with up to 24 hours of grace. Jobs that run at least once a day are fine.
No. The lines are built in your browser. Nothing you type is sent to Edesy until your job calls the URL itself.
A cron job that silently stops running is the outage nobody notices. Add one curl line to the job, and Edesy OnCall phones you when the ping doesn't arrive on time or the job reports a failure.
An escalation policy is the ladder an alert climbs until a human takes it. How steps, wait times, channels and repeats work, three example policies for small teams, and the mistakes that leave alerts unanswered.
Crontab line with success ping and optional failure ping
Presets from every minute to once a day, or your own cron expression
Suggested heartbeat period and grace time
Failure message URL-encoded by curl, no % in crontab
Wrapper script download
Runs in your browser, no signup
Know the same night when a database dump or file backup didn't run.
Daily reports, feed exports and billing runs that fail without anyone noticing.
Inventory, price and order syncs, or queue workers that ping after each batch.
Edesy OnCall calls your team in English or Hindi and escalates until someone presses 1.
The Free plan includes 3 monitors. Alert calls are billed per minute from your Edesy wallet; prices exclude 18% GST.
Built by Edesy
Edesy builds AI products for Indian businesses. Start self-serve, no demo call needed.
AI agents that answer and make phone calls 24/7. Handle appointments, inquiries and support in Indian and global languages.
₹50 free credit. No demo call needed.