Healthchecks — Cron Job Monitoring with Smart Alerts
Healthchecks is a self-hosted cron job and scheduled task monitor that alerts you when your periodic jobs fail to run on time.
Installation avec revue préalable
Cet actif nécessite une revue. Le prompt copié demande un dry-run, affiche les écritures, puis continue seulement après confirmation.
npx -y tokrepo@latest install 58bfd180-39f2-11f1-9bc6-00163e2b0d79 --target codexDry-run d'abord, confirmez les écritures, puis lancez cette commande.
What it is
Healthchecks is a self-hosted monitoring service for cron jobs and scheduled tasks. Instead of checking whether a service is up, it checks whether your periodic jobs are running on schedule. When a job misses its expected ping, Healthchecks sends an alert.
It serves system administrators, DevOps engineers, and backend developers who run scheduled tasks (backups, data syncs, report generation) and need to know immediately when something stops working silently.
How it saves time or tokens
Failed cron jobs are silent failures. Without monitoring, you might not discover a broken backup job until you need a restore. Healthchecks converts these invisible failures into immediate alerts via email, Slack, PagerDuty, or webhooks. The ping-based design requires only a single HTTP request or curl call appended to your existing scripts.
How to use
- Create a check in Healthchecks with the expected schedule (cron expression or simple interval).
- Copy the unique ping URL and add a curl call to the end of your cron job script.
- Configure notification channels (email, Slack, PagerDuty) to receive alerts when pings are missed.
Example
# Add a ping to your existing cron job
# crontab -e
0 2 * * * /usr/local/bin/backup.sh && curl -fsS -m 10 --retry 5 https://hc-ping.com/your-uuid-here
# Python script with Healthchecks ping
import requests
import subprocess
try:
subprocess.run(['python', 'etl_pipeline.py'], check=True)
requests.get('https://hc-ping.com/your-uuid-here')
except Exception as e:
requests.get('https://hc-ping.com/your-uuid-here/fail')
raise
Related on TokRepo
- AI Tools for Monitoring — Monitoring and observability tools for infrastructure
- AI Tools for DevOps — DevOps automation and infrastructure management
Common pitfalls
- Setting the grace period too short, causing false alerts when jobs take slightly longer than expected.
- Pinging at the start of the job instead of the end, which hides jobs that start but fail to complete.
- Forgetting to handle the failure ping endpoint for jobs that should report errors explicitly.
Questions fréquentes
Uptime monitors check whether a service responds to requests. Healthchecks monitors the absence of expected pings. It detects when scheduled jobs stop running, which uptime monitors cannot catch because there is no service endpoint to probe.
Yes. Healthchecks is open source and provides Docker images and detailed self-hosting documentation. You can run it on your own infrastructure with PostgreSQL or MySQL as the database backend.
Healthchecks supports email, Slack, PagerDuty, Opsgenie, Discord, Telegram, webhooks, and many other integrations. You can configure multiple channels per check for redundancy.
Yes. Any periodic task that can make an HTTP request works with Healthchecks. This includes systemd timers, Kubernetes CronJobs, Airflow DAGs, Windows Task Scheduler, and custom schedulers.
Yes. The hosted version at healthchecks.io offers a free tier with up to 20 checks. For unlimited checks or self-hosting, the open-source version is available at no cost.
Sources citées (3)
- Healthchecks GitHub— Self-hosted cron job monitoring with smart alerts
- Healthchecks Documentation— Ping-based monitoring with multiple notification channels
- Healthchecks README— Open source with Docker self-hosting support
En lien sur TokRepo
Fil de discussion
Actifs similaires
cAdvisor — Real-Time Container Resource Monitoring by Google
Analyze container resource usage and performance with Google's cAdvisor. Native Docker support, Prometheus metrics export, and zero-config deployment for production container monitoring.
Faktory — Language-Agnostic Background Job Server
Faktory is a background job server that decouples job queuing from job execution, allowing workers in any programming language to process tasks. Created by the author of Sidekiq, it brings battle-tested job processing patterns (retries, scheduled jobs, priorities, batches) to polyglot environments.
Agenda — Lightweight Job Scheduling for Node.js
A flexible and lightweight job scheduling library for Node.js backed by MongoDB, supporting cron-style scheduling, job priorities, concurrency control, and persistent job storage.
APScheduler — Advanced Python Scheduler for Background Jobs
APScheduler is a Python library for scheduling jobs to run at specified intervals, cron expressions, or specific dates, with support for persistent job stores and multiple execution backends.