Skip to content

ref(crons): Add Fugit schedule conversion helper - #3141

Open
wedamija wants to merge 3 commits into
masterfrom
danf/cron-fugit-config
Open

wedamija wants to merge 3 commits into
masterfrom
danf/cron-fugit-config

Conversation

@wedamija

@wedamija wedamija commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Part of a series that sends Crons monitor configs from Ruby schedulers. Check-ins for a monitor that does not exist yet are dropped, so today every monitor has to be created by hand with its schedule copied from the code. Sending the schedule lets Sentry create the monitor and keep it in sync.

This adds Sentry::Cron::FugitSchedule, which converts a Fugit cron or interval into a monitor config. Fugit is the schedule parser behind rufus-scheduler and Solid Queue, so both integrations use it: #3110 (rufus-scheduler) and #3140 (Solid Queue).

It also converts Fugit syntax that has a Crons equivalent: the last day of the month (L), the nth or last weekday of the month (mon#2, fri#-1), and whole-hour UTC offsets (+05:00 becomes Etc/GMT-5).

It returns nil when the schedule can't be expressed in the Crons schedule format, for example a job that runs every 10 seconds. Those jobs still send check-ins, but without a monitor config.

The SDK doesn't depend on Fugit. The lockfile changes only add it as a dev dependency for the specs.

Add Sentry::Cron::FugitSchedule, which turns fugit cron lines and
intervals into monitor configs. It returns nil for schedules Sentry
would read differently. Shared by the rufus-scheduler and Solid Queue
integrations. fugit is added as a dev dependency for the specs.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@wedamija
wedamija marked this pull request as ready for review October 16, 2026 22:57
Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant