Skip to content

Cron check quickstart

By the end of this guide you’ll have a cron check expecting a ping every 24 hours, your job sending the ping, and a verified failure → alert path.

  1. Go to Observe → Monitors, open Add monitor and choose Cron monitor.

  2. Configure:

    • Name: Nightly backup.
    • Check Interval Minutes: the 24h mark (one day, 86400 seconds in the API).
    • Notification groups: leave the Default group selected.
  3. Click Create monitor. The check page shows its Ping URL at the top, with a line to add to your job.

Add a single line to the end of your job, after the work has succeeded.

Terminal window
# Bash (at the end of nightly_backup.sh)
PING_URL="https://ping.siteqwality.com/<account-id>/<cron-job-id>"
if pg_dump $DB > backup.sql && aws s3 cp backup.sql s3://backups/; then
curl -fsS --max-time 10 --retry 3 "$PING_URL" || true
fi
# Python
import requests
PING_URL = "https://ping.siteqwality.com/<account-id>/<cron-job-id>"
def ping():
try:
requests.post(PING_URL, timeout=10)
except requests.RequestException:
pass # never let the ping failure kill the job
# At the end of your job
do_backup()
ping()
// Node
const PING_URL = "https://ping.siteqwality.com/<account-id>/<cron-job-id>";
async function ping() {
try {
await fetch(PING_URL, { method: "POST" });
} catch {
// intentional swallow so ping failures don't break the job
}
}
await doBackup();
await ping();

The check’s Recent pings list shows each ping, when it arrived and who sent it, within seconds.

To verify the alerting path:

  1. Edit the cron check and drop Check Interval Minutes to 5m (check_interval_seconds: 300 in the API).
  2. Don’t ping for 7 minutes.
  3. The check flips to failed and your notification group fires.
  4. Send a ping manually (curl <ping-url>). The check flips back to success right away and the group gets the all clear.

Don’t forget to set the interval back to 24h (86400) when done testing.