# Monitor Vercel Cron Jobs with HookPulse check-ins

The function checks in when the job ends and reports the failure. Vercel calls it on the schedule in vercel.json.

HookPulse · Updated 2026-10-14

## Step 1. Create the monitor

Add a routine named vercel-cron and set how often the job runs. Its page shows the check-in URL: use it in place of https://hookpulse.net/in/YOUR_ID.

## Step 2. Add the cron to vercel.json

Vercel runs cron jobs in UTC: this one runs at 03:00 UTC.

```json
{
  "crons": [
    {
      "path": "/api/nightly",
      "schedule": "0 3 * * *"
    }
  ]
}
```

## Step 3. Write the function

Set CRON_SECRET and HOOKPULSE_URL in the project settings. Vercel sends CRON_SECRET in the Authorization header, so only Vercel can start the job.

```
// api/nightly.js
export async function GET(request) {
  if (request.headers.get("authorization") !== `Bearer ${process.env.CRON_SECRET}`) {
    return new Response("Unauthorized", { status: 401 });
  }
  const checkIn = (path = "") =>
    fetch(process.env.HOOKPULSE_URL + path, { signal: AbortSignal.timeout(10_000) });
  try {
    await runJob();
    await checkIn();
    return new Response("ok");
  } catch (error) {
    await checkIn("/fail").catch(() => {});
    return new Response("failed", { status: 500 });
  }
}
```

## Step 4. Run it once

Deploy, then run the cron job once from the project settings. The routine shows the first check-in. From then on, a missed or failed run sends the alert.

[Create the monitor](https://hookpulse.net/?routine=vercel-cron&every=86400#routines)

[Monitor Vercel Cron Jobs with HookPulse check-ins](https://hookpulse.net/guides/vercel-cron)
