Set Up Crons
Sentry Crons allows you to monitor the uptime and performance of any scheduled, recurring job in your application.
Once implemented, it'll allow you to get alerts and metrics to help you solve errors, detect timeouts, and prevent disruptions to your service.
- Use our getting started guide to install and configure the Sentry SDK (version
7.51.1
or newer) for your recurring job. - Create and configure your first Monitor.
When your recurring job fails to check in (missed), runs beyond its configured maximum runtime (failed), or manually reports a failure, Sentry will create an error event with a tag to your monitor.
To receive alerts about these events:
- Navigate to Alerts in the sidebar.
- Create a new alert and select "Issues" under "Errors" as the alert type.
- Configure your alert and define a filter match to use:
The event's tags match {key} {match} {value}
.
Example: The event's tags match monitor.slug equals my-monitor-slug-here
Learn more in Issue Alert Configuration.
To prevent abuse and resource overuse, Crons limits check-ins to 6 per minute for each monitor environment.
For example, if you have a monitor called "database-backup" with two environments:
database-backup
in environmentproduction
can send up to 6 check-ins per minutedatabase-backup
in environmentstaging
can also send up to 6 check-ins per minute- Combined, they can send up to 12 check-ins per minute
You can verify if any check-ins are being dropped by visiting the Usage Stats page. To avoid dropped check-ins, ensure your monitors don't exceed the rate limit.
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").