When your recurring job fails to check-in on schedule or runs beyond its configured max runtime, Sentry will create an error event with a tag. To alert on these error events, you can utilize the existing issue alerts feature in Sentry. Here's a brief guide on how to set it up specifically for Cron Monitors.

Step 1: Set Filters

Navigate to the alerts tab in Sentry and create a new issue alert. You should see the issue alert builder. From here, you can start configuring your cron monitor alert rule. First, select the project corresponding to your cron monitor. Then, in the IF section of the alert rule configuration, add a new filter. You'll want to select the filter labeled "The event's tags match {key} {match} {value}".

Cron alert filter

Fill in the key text field with, then have it equal the id of the cron monitor that you'd like to be alerted on. You'll see your cron monitor's id in the cron monitor's detail page.

Example cron id

After filling in those fields your finished alert rule filter should look something like:

Cron completed alert filter

Step 2: Choose Notification Actions

Finalize your alert rule by adding actions and assigning the alert rule to a team. More information on customizing alert rule actions can be found here.

Lastly, save your newly created issue alert rule. You should start getting alerts on new errors created from your cron monitor!

Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) to suggesting an update ("yeah, this would be better").