resque/resque-scheduler
60.4
Adequate · 19 September 2026
2k
lines of production code
Ruby
primary language
1
measurement over time
What this system is
Resque Scheduler is a Ruby library that extends the Resque job queue with capabilities for managing delayed and recurring jobs via Redis. It provides a modular architecture featuring a dedicated CLI, environment-aware scheduling, and robust process locking to prevent race conditions. The system includes a web interface for monitoring and managing scheduled tasks, along with mechanisms for dynamic schedule persistence and resilient error handling.
How it got here
2009 — Resque Scheduler 5.0.0 foundation
4 changes.
This period established the foundational structure for Resque Scheduler 5.0.0, introducing modernized Ruby 3.0 configurations, standard contributor documentation, and a comprehensive test suite. It implemented core behavioral changes including environment-aware scheduling, master/child process locking, and dedicated Rake task loading to ensure robust operation and graceful error handling.
2010–2013 — Modular architecture and dynamic scheduling
6 changes.
The project underwent a major architectural refactor to replace its monolithic structure with a modular design, introducing a new CLI and robust locking mechanisms with configurable timeouts. Concurrently, it enhanced usability by adding convenience loading files and comprehensive examples for dynamic scheduling, including strategies to persist schedules across restarts.
2014–2016 — CLI and UI enhancements
4 changes.
This period focused on expanding the Resque Scheduler's functionality through a new command-line interface and a redesigned web UI for managing delayed jobs. It also included infrastructure improvements such as Redis data migration scripts and updated Vagrant test environments to support consistent development and CI integration.
Features
Added convenience require file for resque-scheduler
A new top-level lib/resque-scheduler.rb file has been added, allowing users to load the library simply by requiring 'resque-scheduler'. This file internally requires the main scheduler module and extends the Resque class with the scheduler extension, ensuring the scheduler functionality is available immediately upon loading.
lib · high confidence
Added dynamic scheduling example with schedule recovery job
The dynamic scheduling example now includes a new \FixSchedulesJob\ that runs periodically to restore dynamic schedules that are lost during application restarts, addressing a known issue in resque-scheduler where dynamic schedules are wiped on redeployment. The example also provides the \SendEmailJob\ and \User\ model to demonstrate how to dynamically schedule jobs, along with updated Rake tasks to properly configure the Resque scheduler with dynamic scheduling enabled and static schedule loading.
examples/dynamic-scheduling · high confidence
Added example configuration and dynamic scheduling workaround
The examples directory now includes a complete setup for running the Resque web interface, featuring a new Rakefile, a resque-web initializer that supports loading schedules from YAML or JSON files, and a shell script to launch the web UI. Additionally, a new dynamic-scheduling example folder 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 schedules.
examples · high confidence
Added executable entry point for Resque Scheduler CLI
A new executable script named 'resque-scheduler' has been added to the 'exe' directory. This script sets up the Ruby environment and invokes the Resque::Scheduler::Cli.run! method, providing a direct command-line interface for users to manage the Resque scheduler.
exe · high confidence
Initial repository structure and configuration for Resque Scheduler 5.0.0
This change establishes the foundational project structure for version 5.0.0, introducing a modernized RuboCop configuration (\.rubocop.yml\) targeting Ruby 3.0 and enforcing a \DisabledByDefault\ policy. It adds standard contributor documentation files (\AUTHORS.md\, \CONTRIBUTING.md\, \CODE\_OF\CONDUCT.md\, \LICENSE\) and a \.gitignore\ that excludes environment-specific files (\.env.\\) and build artifacts. The entry also includes a \Rakefile\ that replaces custom test tasks with \Rake::TestTask\ and integrates YARD documentation generation, while removing the legacy \README.markdown\ in favor of \README.md\.
(repo-wide) · 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
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 integration with environment-aware scheduling and master/child locking
The \lib/resque/scheduler.rb\ module now supports scheduling jobs based on the current environment (via \rails\_env\ or \env\ configuration), allowing jobs to be loaded only when the environment matches. It also introduces master/child process locking to prevent race conditions during schedule updates and ensures graceful shutdown handling for Rufus::Scheduler threads. Additionally, the scheduler now logs last execution times for scheduled jobs and handles intermittent Redis errors without crashing the process.
lib/resque · 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 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 Resque Scheduler; 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
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 60.
Lenses
- Code Health 96
- Architecture 97
- Maturity 55
- Readiness 54
- Security 95
- Domain Modelling 100
- Accessibility 53
Changes since last survey
- 300 commits — 272 feature/other, 28 fixes
By area
- (root) — 117 commits
- (repo) — 81 commits
- lib/resque — 54 commits
- .github/workflows — 16 commits
- test/resque-web_test.rb — 6 commits
- test/delayed_queue_test.rb — 4 commits
- test/scheduler_test.rb — 3 commits
- .github/funding.yml — 2 commits
- test/env_test.rb — 2 commits
- test/multi_process_test.rb — 2 commits
- test/scheduler_setup_test.rb — 2 commits
- test/test_helper.rb — 2 commits
- test/vagrant — 2 commits
- .devcontainer/Dockerfile — 1 commit
- .github/dependabot.yml — 1 commit
- test/cli_test.rb — 1 commit
- test/scheduler_args_test.rb — 1 commit
- test/scheduler_hooks_test.rb — 1 commit
- test/scheduler_task_test.rb — 1 commit
- test/util_test.rb — 1 commit
Notable commits
- fix: Fix ERB syntax
- fix: Fix XSS vulnerability
- fix: Fix Resque::Scheduler.print_schedule
- fix: Fix crash with JSON 2.7.0
- fix: Fix deprecated uses of Redis#pipelined
- fix: Fix failing tests
- fix: Fix flaky test by not relying on a magical sleep instead continue to check for the value several times
- fix: Fix for #761, reflected XSS in delayed_schedules.erb
- fix: Fix reading configuration from environment for boolean values (#735)
- fix: Fix redis-namespace deprecations for Redis administration commands Remove redis gem restrictions
- fix: Fix registering signal keys for Windows.
- fix: Fix test compatibility with Rack 3
- fix: Fix undef header method failures
- fix: Get the test suite back to green * Fix some mocha and redis deprecation warnings * Only do strict keyword matching on Mocha for ruby >= 2.7.0 * Only raise on deprecatioin in specs on redis >= 5.0
- fix: Grammar fix
- fix: Merge branch 'master' into fix-xss-vulnerability
- fix: Merge pull request #531 from Shopify/fix-race-condition-3
- fix: Merge pull request #532 from Shopify/fix-config
- fix: Merge pull request #641 from evjan/readme-grammar-fix
- fix: Merge pull request #644 from jiikko/fix-poll_sleep_amount
- …and 280 more
Written by watchdog.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 19 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit f12335fa06fb8fe00b517c06e9aa3410f5aa4ee6 — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-13a154b7f5d1.