Cron और हार्टबीट मॉनिटरिंग

Silent failures are the worst failures. Add one line to your job and get alerted the moment it stops running.

  • Works with any language or scheduler
  • Success and failure pings
  • Email and webhook alerts
और गहराई सेआप आगे क्या पता लगाना चाहते हैं?

Add the ping to your job

crontab (Linux)

# run at 02:00, ping only on success
0 2 * * * /usr/local/bin/backup.sh && curl -fsS --retry 3 https://sitedowncheck.com/ping/YOUR_KEY > /dev/null
# or report a failure explicitly
0 2 * * * /usr/local/bin/backup.sh || curl -fsS https://sitedowncheck.com/ping/YOUR_KEY/fail

Windows Task Scheduler (PowerShell)

.\backup.ps1
if ($LASTEXITCODE -eq 0) { Invoke-WebRequest -UseBasicParsing https://sitedowncheck.com/ping/YOUR_KEY | Out-Null }
else { Invoke-WebRequest -UseBasicParsing https://sitedowncheck.com/ping/YOUR_KEY/fail | Out-Null }

Python

import requests
try:
    run_backup()
    requests.get("https://sitedowncheck.com/ping/YOUR_KEY", timeout=10)
except Exception:
    requests.get("https://sitedowncheck.com/ping/YOUR_KEY/fail", timeout=10)
    raise

GitHub Actions

- name: Nightly job
  run: ./job.sh
- name: Ping monitor
  if: success()
  run: curl -fsS --retry 3 https://sitedowncheck.com/ping/YOUR_KEY

How it works

  1. Create the monitorSay how often the job should run. You receive a private ping URL.
  2. Ping on successMake your job request the URL when it finishes correctly. Add /fail to report a known failure.
  3. We watch the clockIf the next ping does not arrive within the interval plus a short grace period, the monitor goes down and you get an alert. The next ping closes the incident.

अक्सर पूछे जाने वाले प्रश्न

How does heartbeat monitoring work?

You get a unique ping URL. Your job requests it each time it finishes. If no ping arrives within the expected interval plus a short grace period, we alert you. A /fail ping reports a failure immediately.

What can I monitor?

Cron jobs, database backups, nightly imports, queue workers, report generators, certificate renewals and any scheduled task that can make an HTTP request.

What if the job runs but does the wrong thing?

Ping only after the job succeeds, and call /fail when it detects a problem. A job that crashes before the ping is treated as missed.

How long is the grace period?

About 10 percent of the interval, with a minimum of two minutes, so a job that runs a little late does not raise a false alarm.

Is the ping URL secret?

Treat it like a password. Anyone who has it can send pings. If it leaks, delete the monitor and create a new one.

Related guides