Monitor a Linux cron job with Verifagent
Cron is the most common server schedule. Append a Verifagent call after the job command so silence means the job never ran or failed before the ping.
Before you start
Create a monitor with your workflow’s real frequency, then copy its URL from the dashboard. Its token is secret: do not publish it.
Setup
Copy the monitor URL
Create a monitor whose expected period matches the crontab schedule (for example every day at 03:15 → 24h period). Copy the ping URL from the dashboard.
https://verifagent.com/api/ping/your-ping-tokenChain the real command with &&
Edit crontab with crontab -e. Put the business command first, then && curl so the ping runs only if the command exits 0. A leading ping would lie about success.
# Every day at 03:15 — replace the script path and URL
15 3 * * * /usr/local/bin/backup.sh && curl -fsS "https://verifagent.com/api/ping/your-ping-token"Use an absolute PATH and a full curl path if needed
Cron starts with a minimal environment. Prefer absolute paths for binaries and scripts. If curl is missing from PATH, call /usr/bin/curl explicitly.
# Minimal env trap: set PATH or use absolute paths
PATH=/usr/local/bin:/usr/bin:/bin
15 3 * * * /usr/local/bin/backup.sh && /usr/bin/curl -fsS "https://verifagent.com/api/ping/your-ping-token"Test outside cron first
Run the same chained command in your shell once. You should see HTTP 200 and {"ok":true}. Then wait for the next cron tick or force a run.
/usr/local/bin/backup.sh && curl -fsS "https://verifagent.com/api/ping/your-ping-token"Available routes
The base URL is enough for a heartbeat. Variants enrich history if your platform has several branches.
GET https://YOUR_PING_URLPOST https://YOUR_PING_URL/successPOST https://YOUR_PING_URL/fail?msg=ErrorVerify
After a successful chained run, open the monitor: status becomes Up. Temporarily break the command (false && curl …) and confirm no new ping arrives until you fix it.
200 {"ok":true}. The monitor moves from Pending to Up.