Free Cronjob Monitor Setup for Serverless Schedules
Serverless schedulers promise simplicity. Then a function stalls and you find out three days later. exit1.dev gives you free cron monitoring that keeps Lambda, Cloudflare Workers, and Cloud Functions honest.
1. Create the heartbeat monitor
Open exit1.dev, add a new monitor, and select Cron / Heartbeat. Name it after the scheduled function, tag it with the team, and set the interval equal to the schedule plus a buffer.
2. Ping from your function
Add a POST request to the monitor URL at the end of the handler:
await fetch(process.env.EXIT1_MONITOR_URL, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
status: "success",
duration_ms: duration,
region: context.invokedFunctionArn?.split(":")[3]
})
});
Use environment variables for the monitor URL so you can rotate it without redeploying. Keep the payload lean—only the numbers you’ll actually assert.
3. Assert on payloads
Inside exit1.dev, add JSONPath rules like $.status == "success" and $.duration_ms < 60000. Failures trigger alerts even if the heartbeat fires, catching partial work or slow runs.
4. Route alerts per environment
Send production failures to PagerDuty or Slack. Point staging or nightly jobs to email digests. Unlimited integrations mean you don’t have to choose. Combine with Free Uptime Monitor Email Alerts to keep execs informed without giving them dashboard logins.
5. Track runtime drift
Exit1.dev keeps run history, so you can plot duration creep over time. When a job suddenly takes 2x longer, you’ll see it before the cloud bill spikes. Export data to spreadsheets with Logs to Warehouse for monthly reviews.
6. Cover dependencies
Monitor the API, database, or queue your function touches. The Free Website Monitor for Developers article shows how to stack HTTP checks, SSL alerts, and cron monitors in one place.
7. Fail fast in staging
Clone your heartbeat monitor for staging and shorten the interval. Force a failure before every release by blocking the outbound ping. If no alert fires, your monitoring is broken. Fix that before shipping.
Serverless should mean less infrastructure, not less visibility. exit1.dev makes cronjob monitoring free, fast, and brutally honest.
Morten Pradsgaard is the founder of exit1.dev — the free uptime monitor for people who actually ship. He writes no-bullshit guides on monitoring, reliability, and building software that doesn't crumble under pressure.