How-to

Monitor a scheduled job (cron) with check-ins

A cron job that silently stops running is the outage you find out about last. Check-ins tell Vakt360 when a job starts and finishes, so a missed run is flagged immediately.

How-to · 4 min read

  1. Send a check-in when your job runs

    Using the Sentry SDK's check-in API, report when the job starts and when it finishes. The first check-in creates the monitor automatically, with no manual setup in the dashboard first.

    ts
    const checkInId = Sentry.captureCheckIn({
      monitorSlug: "nightly-billing",
      status: "in_progress",
    });
    
    // ... run the job ...
    
    Sentry.captureCheckIn({
      checkInId,
      monitorSlug: "nightly-billing",
      status: "ok", // or "error" if it failed
    });
  2. Let the monitor auto-create

    Vakt360 creates the monitor the first time your job checks in, and learns its expected interval over the first few runs to avoid false alarms.

  3. Confirm the expected schedule

    Check the monitor's expected schedule so a check-in that doesn't arrive in its window is treated as missed, whether the job crashed, hung or never ran.

  4. Get alerted on a miss

    Add an alert for missed check-ins so a silent failure reaches your team. Missed-run alerts route through the same email, Slack and webhook channels as your errors.

  5. See it next to your errors

    Cron incidents sit in the same timeline as the errors happening at the same moment, so you can see cause and effect in one place.

Start monitoring on the free plan

100,000 events a month, no card required. Point your existing SDK at Vakt360 and see your first event in minutes.