Uptimecat

Cron job monitoring: alert when a job goes silent

Failed jobs rarely make noise. A heartbeat monitor flips the check around: your job reports in, and silence raises the alert.

How push monitors work

A push monitor gives you a unique URL. Your job calls it when it finishes. If no call arrives within the interval you set, the monitor goes down and you are alerted.

This catches jobs that never start, crash halfway, hang or run on a machine that is off. It also works for private hosts, since the call goes outward.

Add a heartbeat

  1. Add a monitor and choose Push.
  2. Set the heartbeat interval a little longer than the job schedule.
  3. Copy the push URL.
  4. Add a call to the URL at the end of your script, only after success.

Example crontab

# nightly backup, then report success
0 2 * * * /usr/local/bin/backup.sh && curl -fsS https://YOUR-PUSH-URL-FROM-DASHBOARD >/dev/null

Good fits

  • Database and file backups.
  • Billing and invoice runs.
  • Queue workers and scheduled imports.
  • Certificate renewal jobs.
  • Scripts that stand in for unsupported checks, such as UDP services or domain expiry.

Tips

Call the URL only on success, so a failing job stays silent. Add a grace margin to the interval. Use tags and groups to organize many jobs, as described in advanced features. For agents and pipelines, see AI agent monitoring.

Handling edge cases

Jobs with variable run time need a generous interval. If a report takes between five and thirty minutes, set the interval to forty-five minutes. Jobs that run only on weekdays need the interval to cover the weekend, or a separate approach.

Long jobs can send a start ping and a finish ping if you want to see how long they ran. At minimum, report success only at the end.

If a job fails loudly, make it fail the shell command so the heartbeat call is skipped. In scripts, use set -e or check exit codes. For container jobs, call the URL from the final step of the pipeline. The response time view is not used for push monitors, since the job reports in on its own.

Give each heartbeat its own monitor rather than reusing one URL for many jobs. Separate monitors tell you exactly which job stopped, and let you set a different interval for each. Name them after the job and the host, for example nightly-backup db1, so the alert is clear without opening the dashboard.

Frequently asked questions

Does the URL need authentication?

The URL itself is the secret. Keep it out of public repositories.

Can I send a status message?

Yes. Push URLs accept status and message query parameters, so a job can report down explicitly.

What if the job runs every minute?

Set the interval to two or three minutes to avoid alerts from timing drift.

Related

Open the dashboard

Sign in with your Google account to add a monitor and pick an alert channel. Access is currently limited to Moruk accounts; open sign-up is not available yet.

Sign in