Monitoring a Vercel Cron Job
Vercel Cron Jobs trigger a route of your app at a regular interval. But if the function times out, returns a 500, or you exceed your cron quota, nothing alerts you. You find out when the data goes stale.
Ping Cron-Ping from your cron route
// app/api/cron/route.ts
export async function GET() {
try {
await myImportantTask();
await fetch("https://cron-ping.com/p/<token>"); // success
} catch (e) {
await fetch("https://cron-ping.com/p/<token>/fail"); // failure → immediate alert
throw e;
}
return Response.json({ ok: true });
}Vercel cron configuration
// vercel.json
{
"crons": [
{ "path": "/api/cron", "schedule": "0 * * * *" }
]
}On the Cron-Ping side, create a check with the same frequency ("every hour") and a grace period of a few minutes. If the function doesn't ping, you're notified.
Common Vercel cron pitfalls
- Serverless function timeout (plan duration limit).
- Cron job quota exceeded on the Hobby plan.
- Broken deploy → the route no longer exists but the cron "succeeds" with a 404.
Monitor your Vercel cron in 2 minutes with Cron-Ping
Start for free