Get alerted when a cron job or scheduled command stops running.
A scheduled task monitor gives a job its own ping URL. The job requests the URL each time it runs, and Ledge alerts you when a ping doesn't arrive on time. Use it for backups, imports, feed syncs, queue runners on cron, or anything else that fails quietly.
Open the site, go to Scheduled Tasks and click Monitor Scheduled Task.
| Field | What it does | Default |
|---|---|---|
| Type | Simple for a job that runs every few minutes or hours, Cron for a cron expression. | Simple |
| Frequency | Simple only. How often the job runs, from 1 to 1,440 minutes. | 5 |
| Expression | Cron only. The job's schedule, such as 0 3 * * *. | |
| Timezone | Cron only. The timezone of the server running the job. | UTC |
| Grace time in minutes | How long to wait after the expected run before alerting, from 1 to 1,440. | 5 |
| Description (optional) | A note for whoever reads the alert. |
Save, then copy the Ping URL. Each monitor's URL is unique, so treat it like a password.
Request the ping URL when the job finishes successfully. With &&, the ping only goes out if the command before it worked, so a failed job shows up as a missed run.
0 3 * * * /usr/local/bin/nightly-import && curl -fsS -m 10 --retry 3 YOUR_PING_URL > /dev/nullBoth GET and POST work. You can also send details with a POST:
| Field | What it does |
|---|---|
runtime | How long the job took, in milliseconds. Shown on the runtime chart. |
status | ok, warn or error. |
message | Up to 255 characters, shown in the ping history. |
curl -fsS -X POST YOUR_PING_URL -d 'runtime=3500'A ping with status=error is recorded in the history but doesn't send an alert, because the job still ran. If a failure should alert you, don't ping when the job fails.
| Status | What it means |
|---|---|
| Pending | Waiting for the first ping. |
| Healthy | The last ping arrived on time. |
| Missed | No ping arrived by the expected time plus the grace time. |
Alerts start after the first ping. A new monitor stays Pending, and doesn't alert, until the job pings once. Run the job by hand after setting it up so you know the monitor is live.
When a missed task pings again, Ledge sends one Recovered notice.
Each monitor shows its last ping, when the next is due, a 30-day health bar, a runtime chart and the ping history, which is kept for 90 days.
Pause stops a monitor, and its ping URL stops accepting pings. When you resume it, Ledge starts waiting for the next ping from that moment. Deleting a monitor deletes its ping URL too.