Skip to content

feat(crons): Add Solid Queue recurring task monitoring - #3140

Draft
wedamija wants to merge 2 commits into
danf/cron-fugit-configfrom
danf/solid-queue-crons
Draft

wedamija wants to merge 2 commits into
danf/cron-fugit-configfrom
danf/solid-queue-crons

Conversation

@wedamija

@wedamija wedamija commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Sends Crons check-ins for Solid Queue recurring tasks (config/recurring.yml and dynamic tasks). Each run sends in_progress/ok/error check-ins with the task key as the slug and the task's schedule (crontab + IANA time zone) as the monitor config, so Sentry upserts the monitor.

Enable it like the other scheduler integrations (:sidekiq_cron, :rufus_scheduler):

Sentry.init do |config|
  config.enabled_patches << :solid_queue_recurring
end

How it works. RecurringTask#enqueue (public, same signature in Solid Queue 1.1 through 1.7) marks the job it enqueues, and the job's serialized payload carries the slug and schedule to the worker, where an around_perform sends the check-ins. The schedule is resolved in the scheduler process, using the same zone Solid Queue uses: the zone in the schedule, then SolidQueue.time_zone (1.7+), then the local zone. The slug comes from the task key, not the job class, so one job class behind several tasks gets one monitor per task. Retries keep the payload, so a retried run checks in again. This also works when a task's job uses a non-Solid Queue adapter.

What is skipped.

  • class: and command: tasks are both monitored.
  • Schedules Sentry would read differently (seconds, L, #, day-of-month AND weekday, non-IANA zones) still send check-ins, but without a monitor config. The conversion is the shared Sentry::Cron::FugitSchedule from ref(crons): Extract Fugit schedule conversion #3139.
  • Jobs that already use Sentry::Cron::MonitorCheckIns (sentry_monitor_check_ins) are left alone.

No CHANGELOG entry: the changelog is generated from PR titles (changelog.policy: auto) and has no Unreleased section.

Stacked on #3139 (which is stacked on #3110).

wedamija and others added 2 commits October 15, 2026 20:30
Opt-in via `config.enabled_patches << :solid_queue_recurring`. Each
recurring task run sends in_progress/ok/error check-ins with the task
key as the slug and its schedule as the monitor config.

Co-Authored-By: Claude <noreply@anthropic.com>
Compare the job against the task's job class constant, and only skip
jobs whose class actually configured sentry_monitor_check_ins.

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