Conversation
Add a `monitorCronTriggers` option. When set, each Cron Trigger run of the `scheduled` handler sends in-progress and ok/error check-ins whose monitor config carries the trigger's cron expression, so Sentry creates the monitor on the first run. The slug is derived from the cron expression, or picked by a user function. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 of 6 tasks
Contributor
size-limit report 📦
|
Cloudflare numbers weekdays from 1 = Sunday, while Sentry uses 0 = Sunday, so the weekday field is now converted to names (or a 0-based number for `nL`) before it is sent. Expressions that can't be converted are sent without a schedule. Derived slugs now write `,`, `-` and `/` as distinct tokens and append a hash when the expression has other characters or the slug is too long. A throwing `monitorCronTriggers` function and runs without a cron expression send no check-ins instead of affecting the handler, and the function can return other monitor settings along with the slug. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tion
Replaces the `monitorCronTriggers` option with an opt-in
`cronTriggersIntegration({ slug })`, so the schedule conversion and slug
code is tree-shaken for Workers that don't use it. The scheduled handler
only looks the integration up by name. Also drops `nL` and `n#k` weekday
conversion (sent without a schedule) and simplifies the slug hash.
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
*/n gives the same days in both numberings and keeps Sentry's AND rule for the day fields. Sentry rejects W and ? in the day of month, so send no schedule. Co-Authored-By: Claude <noreply@anthropic.com>
wedamija
marked this pull request as ready for review
October 2, 2026 23:21
wedamija
requested review from
a team,
andreiborza and
isaacs
and removed request for
a team
October 2, 2026 23:21
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit eb22bd1. Configure here.
…dler Start the check-in before the handler's try block and guard the final check-in, so a failing check-in never skips the job, fails a successful run, or is captured as the handler's exception. Co-Authored-By: Claude <noreply@anthropic.com>
On Cloudflare 1 = Sunday, so `1-5` runs Sunday to Thursday. Day names are unambiguous. Co-Authored-By: Claude <noreply@anthropic.com>
Cloudflare doesn't document how day of month and day of week combine, so only send a schedule when one of them is *. The warning now also says the other monitor settings aren't sent. Co-Authored-By: Claude <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Adds an opt-in
cronTriggersIntegrationthat sends check-ins for Cron Triggers, with the schedule fromcontroller.cron, so Sentry creates the monitor on the first run:It's opt-in because monitors are billed.
slugcan also return monitor settings, orundefinedto skip a trigger; without it the slug is derived from the expression. Schedules Sentry would read differently from Cloudflare (L/#/W/?, or both day fields set) are sent without a monitor config, because a wrong schedule causes false missed check-in alerts. Weekday numbers are sent as names, since Cloudflare counts from 1 = Sunday.Tree-shaken when not imported: +267 B on
@sentry/cloudflare (withSentry) - minified.Motivation
Check-ins for monitors that don't exist are dropped, so users have to create each monitor by hand, even though the schedule is already in their
wranglerconfig.Testing
Unit tests for the integration and the schedule conversion.
Docs: getsentry/sentry-docs#19783