Sentry cron monitor says the first check-in was missed
You added a cron monitor, the job ran, and the monitor still reports a missed check-in. It is nearly always one of eight things, and each takes a minute to rule out. The checks are the same whether your check-ins go to Sentry or to Vakt360.
Check the slug matches exactly
A check-in is matched to its monitor by slug, character for character. nightly-billing and nightly_billing are two different monitors, so the one you are watching keeps waiting while the check-ins land somewhere else. Copy the slug from the monitor's settings into your code rather than typing it.
tsSentry.captureCheckIn({ monitorSlug: "nightly-billing", // must equal the monitor's slug exactly status: "in_progress", });Flush before the process exits
This is the most common cause for scripts started by cron. The SDK sends events in the background, so a script that ends straight after the job can exit with the check-in still queued, and it is never sent. Wait for the SDK to flush before the process exits.
tsSentry.captureCheckIn({ checkInId, monitorSlug: "nightly-billing", status: "ok" }); // Give the SDK up to 2 seconds to send the check-in before the script ends. await Sentry.flush(2000);Give cron the DSN
Cron runs jobs with a minimal environment. A SENTRY_DSN exported in your shell profile is not there when cron starts the job, so the SDK starts disabled and sends nothing, without an error. Set the DSN in the crontab, in the job's own config, or in the service unit that runs it, then test with the same user and environment cron uses.
bash# crontab: variables set here are visible to the jobs below SENTRY_DSN=https://<your-key>@ingest.vakt360.com/<project> 0 2 * * * /usr/local/bin/nightly-billingLine up the time zone
A crontab schedule is read in UTC unless the monitor has a time zone. A job that runs at 02:00 in Oslo runs at 01:00 UTC in winter and 00:00 UTC in summer, so a monitor expecting 02:00 UTC finds nothing in its window and reports a miss. Give the monitor the same time zone as the server's cron.
tsSentry.captureCheckIn( { monitorSlug: "nightly-billing", status: "in_progress" }, { schedule: { type: "crontab", value: "0 2 * * *" }, timezone: "Europe/Oslo", checkinMargin: 5, // minutes }, );Leave room for start-up delay
Each scheduled run gets a margin after its time. If the job first waits for a container to start, a queue or a lock, its first check-in can arrive after the margin has closed. Send the in_progress check-in as the very first thing the job does, and set the margin to cover the slowest normal start.
Check the project and environment
The DSN decides which project a check-in belongs to. Workers often load a different configuration from the web app, so confirm the DSN the job actually uses. In Sentry, check-ins are also split by environment, so a monitor viewed for production does not show check-ins sent as staging.
Rule out a first slot before the first run
A new monitor expects a check-in at the next slot on its schedule. If the monitor exists before the job is deployed, that first slot passes with nothing to report and is flagged as missed. That miss is real but harmless: the next successful check-in clears it. Create the monitor alongside the deploy to avoid it.
On Vakt360, create the monitor first
Vakt360 accepts the same check-ins as Sentry, so the SDK code above works unchanged with a Vakt360 DSN. One difference: a check-in for a slug with no monitor is not stored. The DSN is public, so letting any check-in create a monitor would let anyone fill your project with fake ones. Add the monitor under Uptime and cron with the same slug, schedule, time zone and grace period, then run the job.
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.
