Healthchecks
Healthchecks is a Django service that watches for expected pings from cron jobs and background tasks.
Why consider Healthchecks?
Healthchecks is an open-source cron job and background task monitoring service that uses a dead man's switch approach to send alerts when scheduled processes fail to check in.
Learn Healthchecks by building
Practical setup notes, real use cases, and copy-ready examples in one focused guide.
In this guide3 sections
What is Healthchecks?
Healthchecks is an open-source cron job and background task monitoring service written in Python and Django. Rather than actively probing your applications, it operates as a dead man's switch: your jobs send proactive pings, and the service alerts you when a ping is late. A Check expects an HTTP request from your cron job, staying silent when successful but raising an alert when late.
This approach solves several major problems with the classic MAILTO built into the cron daemon. Unlike classic MAILTO alerts, Healthchecks does not require a local Mail Transfer Agent (MTA) and prevents alert fatigue from cron jobs producing standard output. Healthchecks detects machine-wide failures (like power loss) because the absence of a signal immediately registers as an issue.
Configuring Periods and Grace Times
When you create a new Check, you configure its expected cadence using two critical parameters:
- Period: The expected frequency between successful runs (e.g., 1 hour, or a specific
cronexpression). - Grace Time: Every Check is configured with a Grace Time parameter, representing the additional buffer time to wait before sending an alert for a late job.
The Grace Time is useful because a cron job might occasionally take longer than usual to complete due to high system load or large workloads. By setting the Grace Time slightly above the maximum expected execution time of the job, you prevent false positives.
Adding Healthchecks to a Cron Job
For example, if you run a daily backup script, you can chain a curl call to ping your unique Healthchecks UUID only when the backup script succeeds (exits with a zero status code):
8 6 * * * /home/me/backup.sh && curl -fsS -m 10 --retry 5 -o /dev/null https://hc-ping.com/your-uuid-hereBy using the logical AND operator (&&), the HTTP ping is sent only if /home/me/backup.sh completes without errors. The curl command incorporates arguments like --retry 5 and -m 10 (maximum time in seconds) to handle minor, transient network glitches without incorrectly failing the check-in.
Related tools
More options with a similar category or technology profile.
dash.
Simple, modern server dashboard and hardware monitor for homelabs.
Xen Orchestra
Complete web-based management and backup solution for XCP-ng and XenServer.
Cockpit Project
Web-based graphical interface for Linux servers with zero overhead.
Kresus
Self-hosted personal finance manager with automatic bank synchronization.