resque/resque-scheduler
55.7
Adequate · 6 November 2026
2.1k
lines of production code
Ruby
primary language
4
measurements over time
What this system is
Features
Added example application scaffolding and dynamic scheduling workaround
The examples directory now includes a complete scaffold for a Resque application, featuring a Rakefile, a resque-web initializer that supports loading schedules from YAML or JSON files, and a shell script to launch the web interface. Additionally, a new dynamic-scheduling example provides a workaround for issue \#269, demonstrating how to persist dynamic job schedules across scheduler restarts by using a static hourly job to recreate missing dynamic entries.
examples · high confidence
Added resque-scheduler executable
A new executable script named 'resque-scheduler' has been added to the 'exe' directory. This script allows users to run the Resque Scheduler command-line interface directly from the project root.
exe · high confidence
Added workaround for dynamic schedule loss on restart
The dynamic scheduling example now includes a \FixSchedulesJob\ that runs hourly to restore any dynamic schedules wiped during application restarts, addressing a known issue in resque-scheduler where dynamic schedules are lost on redeployment. This is supported by a new \SendEmailJob\ for sending emails, a \User\ model that automatically schedules email jobs upon creation, and updated Rake tasks to properly load these jobs and configure the scheduler.
examples/dynamic-scheduling · high confidence
Behavioural changes
Added bundle console validation and Redis migration script
The bin directory now includes scripts to validate the bundle console environment and migrate legacy Redis data. A new Ruby script (migrate\_to\_timestamps\_set.rb) migrates delayed job keys from a list-based structure to a set-based structure using sadd/srem, addressing a deprecation in the Redis client. Additionally, batch (bundle\_console\_test.bat) and shell (bundle\_console\_test.sh) scripts have been added to verify that the bundle console command executes successfully, supporting CI integration.
bin · high confidence
Added convenience require for resque-scheduler
Users can now load the library using the standard \require 'resque-scheduler'\ command. This new top-level file acts as a convenience entry point that loads the internal scheduler module and extends the main Resque class with the scheduler extension, ensuring the expected API is available immediately upon loading.
lib · high confidence
Refactored locking mechanism with configurable timeouts and Lua script support
The locking implementation for the Resque scheduler has been refactored to support different lock strategies, including a new 'Resilient' lock that uses Lua scripts for atomic operations. Users can now configure the lock timeout via an environment variable, and the system ensures that lock scripts are refreshed on timeout changes. The 'Basic' lock uses simple Redis commands, while the 'Resilient' lock provides more robust behavior by handling script caching and NOSCRIPT errors automatically. Additionally, the release method now only releases the lock if it belongs to the current process, preventing accidental release of locks held by other instances.
lib/resque/scheduler/lock · high confidence
Rescheduled UI views for delayed jobs and scheduler management
The Resque Scheduler web interface now includes dedicated views for managing delayed jobs and the main scheduler list. Users can view a paginated list of delayed jobs with timestamps, classes, and arguments, and immediately queue or cancel them via new forms. The main scheduler tab displays all scheduled jobs, highlighting those skipped for the current environment, and allows manual queuing or deletion (if dynamic scheduling is enabled). Additionally, a search feature lets users find jobs across delayed, queued, and working states, and a new form handles requeuing jobs that require specific parameters.
lib/resque/scheduler/server · high confidence
Resque Scheduler tasks are now loaded via a dedicated rake file
The project now explicitly loads Resque Scheduler tasks through a new \tasks/resque\_scheduler.rake\ file. This file updates the load path to include the \lib\ directory and requires \resque/scheduler/tasks\, ensuring that the scheduler's rake tasks are available to the application. This change reflects the restructuring of the scheduler library into the \lib/resque/scheduler\ namespace.
tasks · high confidence
Resque Scheduler v4.1.0: Environment-based scheduling, dynamic schedule reloading, and improved signal handling
The Resque Scheduler extension now supports loading jobs per Rails environment via the \rails\_env\ or \env\ configuration keys, allowing schedules to be filtered by the current environment. It introduces dynamic schedule reloading, where the scheduler checks for changes in Redis and updates its internal state without requiring a restart, particularly when acting as the master process. Signal handling has been refactored to be Ruby 2.0+ compatible, preventing high CPU usage during sleep and ensuring graceful shutdowns. Additionally, the scheduler now supports the \every\ syntax alongside \cron\ for defining intervals, allows custom job classes to be scheduled, and includes better error handling for Redis timeouts and intermittent connection errors.
lib/resque · high confidence
Resque Scheduler v5.0.0: Major architectural refactor and new CLI
Resque Scheduler has been upgraded to version 5.0.0, introducing a comprehensive architectural refactor that replaces the previous monolithic structure with a modular design. This change introduces a new command-line interface (CLI) for running the scheduler directly, replacing the traditional Rake task entry point, and extracts core logic into distinct modules for configuration, environment setup, locking, and signal handling. The update also modernizes the logging subsystem by switching to mono\_logger with support for text, JSON, and logfmt formats, and improves reliability by ensuring Redis disconnections no longer crash the process. Additionally, the scheduler now supports configurable lock timeouts via the LOCK\_TIMEOUT environment variable and includes a new failure handler for enqueue errors.
lib/resque/scheduler · high confidence
Test coverage
Added comprehensive test suite for CLI, configuration, and scheduler behavior; Updated Vagrant test environment setup scripts.
Dependencies
Update dependencies for Resque 3.0 and modern Ruby
The gem now requires Ruby 3.0 or higher and upgrades its runtime dependencies to support Resque 3.0 and Redis 4.0+. It also switches from the standard library logger to mono\_logger, adds explicit dependencies for base64 and logger (which are no longer bundled with modern Ruby), and pins rufus-scheduler to versions \>= 3.2 (excluding 3.3) to ensure test stability. Development dependencies have been updated to include irb for Ruby 4+ compatibility and lock RuboCop to version 0.80.
(dependencies) · high confidence
Housekeeping
Initial project scaffolding and configuration
The repository is initialized with essential project files, including a \.gitignore\ to exclude build artifacts and environment files, a \LICENSE\ (MIT), and contributor guidelines (\AUTHORS.md\, \CONTRIBUTING.md\, \CODE\_OF\_CONDUCT.md\). Development tooling is configured via a \Rakefile\ for testing and documentation, a \Vagrantfile\ for environment setup, and \.rubocop.yml\ to enforce code style with a target Ruby version of 3.0. The project documentation is consolidated into \README.md\ and \CHANGELOG.md\, replacing the previous \README.markdown\.
(repo-wide) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 55 → 56 (+0.3)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 63 → 63 (+0.0)
- Architecture 98 → 98 (-0.1)
- Maturity 56 → 60 (+3.7)
- Readiness 47 → 47 (-0.2)
- Security 96 → 94 (-2.1)
- Domain Modelling 100 → 100 (+0.0)
- Accessibility 55 → 55 (+0.0)
Resolved (4)
- Duplicate accessors for the same configuration value. environment and env are standard synonyms in Ruby/Rails contexts, but exposing both as public API methods creates redundancy and potential for drift if one is updated and the other is not.
- Inconsistent access pattern for the logger. Scheduler.logger is exposed as a Property, while Scheduler.logger() is exposed as a Method. In Ruby, this distinction is often subtle but can lead to confusion regarding whether the logger is a static attribute or a computed value.
- Inconsistent naming convention for queue-specific operations. While enqueue_at vs enqueue_at_with_queue is consistent, enqueue_delayed vs enqueue_delayed_with_queue breaks the pattern slightly by using 'delayed' in the name rather than a generic 'enqueue' pattern, making it harder to generalize the API mentally. More importantly, enqueue_delayed implies a default queue, but the naming doesn't clearly signal that it's a variant of a generic enqueue operation.
- Redundant methods differing only by the bang suffix. Without documentation, it is unclear if release_master_lock is a no-op if not locked, while release_master_lock! raises an error, or if they are identical. This violates the principle of least surprise where bang methods usually imply mutation or error-raising on failure.
New (2)
- Floating git dependency: resque
- Off-boarding risk: anonymized user #1
Changes since last survey
- 10 commits — 10 feature/other, 0 fixes
By area
- lib/resque — 5 commits
- (root) — 4 commits
- test/delayed_queue_test.rb — 1 commit
Notable commits
- change: Check master only when a delayed timestamp is due
- change: Cover enqueue hooks that open their own MULTI
- change: Enqueue batched delayed jobs outside the transaction
- change: Load the web UI after Rails initialization to avoid a circular require
- change: Retry a conflicted delayed batch from the outer loop
- change: Skip delayed items when not master
- change: Take the delayed batch and its timestamp memberships in one transaction
- change: Version 5.1.0
- change: Version 5.1.1
- change: add flag for batch enqueue delayed enable/disable
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
resque/resque-scheduler was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 6 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit a4323b1fd84e8d9a2f00ec2ca2f890801621aedd — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.2+preprod-5c4e66d9318b.