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. Create the cron check
Section titled “1. Create the cron check”-
Monitors → New → Cron check.
-
Configure:
- Friendly name:
Nightly backup. - Expected interval:
1 day(86400seconds). - Notification groups: pick your default group.
- Friendly name:
-
Save. The check page now shows a unique ping URL at the top.
curl -X POST https://api.siteqwality.com/cron/job \ -H "Authorization: Bearer $SITEQWALITY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "friendly_name": "Nightly backup", "check_interval_seconds": 86400, "group_notification_ids": ["<group-id>"] }'The response includes id, account_id, and the inferred ping URL: https://ping.siteqwality.com/<account_id>/<id>.
2. Wire your job to ping
Section titled “2. Wire your job to ping”Add a single line to the end of your job, after the work has succeeded.
# Bash — at the end of nightly_backup.shPING_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" || truefi# Pythonimport requests
PING_URL = "https://ping.siteqwality.com/acct_abc123/job_xyz789"
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 jobdo_backup()ping()// Nodeconst PING_URL = "https://ping.siteqwality.com/acct_abc123/job_xyz789";
async function ping() { try { await fetch(PING_URL, { method: "POST" }); } catch { // intentional swallow — don't let ping failures break the job }}
await doBackup();await ping();3. Verify the heartbeat lands
Section titled “3. Verify the heartbeat lands”The check’s Recent pings list shows each received ping with timestamp and source IP within seconds.
curl https://api.siteqwality.com/cron/job/$JOB_ID/recent \ -H "Authorization: Bearer $SITEQWALITY_API_KEY"Returns the most recent receipts.
4. Force a failure
Section titled “4. Force a failure”To verify the alerting path:
- Edit the cron check, drop
check_interval_secondsto300(5 minutes). - Don’t ping for 10 minutes.
- The check flips to
failed, an incident opens, your notification group fires. - Send a ping manually (
curl <ping-url>). The check flips back tosuccessand the incident auto-resolves.
Don’t forget to set the interval back to 86400 when done testing.
What’s next
Section titled “What’s next” Heartbeat best practices Retries, jitter, idempotency, and start-vs-end pinging.
Grace periods How SiteQwality decides 'late enough to alert.'