UI Setup
Create cron monitors in Sentry's interface, then add simple notification code to your app.
The UI Setup approach is a two-step process: first create your monitor definition in Sentry's interface (including alerts), then add simple notification code to your application.
Choose UI setup when you want:
- Pre-configured alerts - monitor creation includes alert setup
- Visual schedule management - update schedules without code changes
- Simple integration - minimal code changes to existing cron jobs
- Navigate to Crons in your Sentry project
- Click Create Monitor
- Configure your settings:
- Name:
daily-report-generator
- Schedule:
0 9 * * 1-5
(9 AM weekdays) - Timezone:
America/New_York
- Name:
Sentry automatically sets up alerts for missed and failed jobs.
After creating the monitor, add simple check-in calls to your cron job:
Copied
import * as Sentry from "@sentry/node";
async function runDailyReport() {
// Notify Sentry the job started
const checkInId = Sentry.captureCheckIn({
monitorSlug: "daily-report-generator",
status: "in_progress",
});
try {
// Your existing job logic
await generateReport();
// Notify success
Sentry.captureCheckIn({
checkInId,
monitorSlug: "daily-report-generator",
status: "ok",
});
} catch (error) {
// Notify failure
Sentry.captureCheckIn({
checkInId,
monitorSlug: "daily-report-generator",
status: "error",
});
}
}
- Run your cron job manually or wait for next execution
- Check Crons dashboard in Sentry to see the check-in
- Test alerts by skipping a scheduled run
Now that you understand the two-step process, choose the best instrumentation approach for your setup:
- Automatic Integration - For node-cron, cron, or node-schedule libraries
- Manual Integration - For custom setups, serverless functions, or full control
Was this helpful?
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").