A Ruby job scheduler supporting at, in, cron, and every jobs using threads.
Rufus-scheduler is a Ruby library for scheduling background jobs to run at specific times, after delays, or on recurring schedules like cron. It solves the need for lightweight, in-process task scheduling without external dependencies, allowing developers to automate periodic tasks within their Ruby applications. The scheduler supports flexible time expressions, thread-based execution, and advanced job management features.
Ruby developers building applications that require scheduled tasks, such as periodic data processing, reminders, or maintenance jobs, especially in web frameworks like Rails or standalone scripts.
Developers choose rufus-scheduler for its simplicity, native Ruby integration, and robust feature set—including cron-like scheduling, timezone support, and fine-grained job control—without the overhead of external job queues or complex setup.
scheduler for Ruby (at, in, cron and every jobs)
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports cron, every, interval, at, and in jobs with natural language parsing using fugit, allowing expressions like 'every 3h10m' or timezone-aware strings like '0 22 * * 1-5 America/Chicago'.
Uses a pooled thread model with configurable max_work_threads and job-level options like overlap: false and mutexes to prevent race conditions, ensuring efficient execution.
Offers features like job tagging, pause/resume, timeouts, and first/last execution bounds, enabling fine-grained control over job lifecycles directly from the README examples.
Integrates tzinfo via et-orbi for accurate timezone handling in schedules, crucial for global applications, though it requires ENV['TZ'] setup on some systems as noted in the FAQ.
As an in-process, in-memory scheduler, all jobs are lost if the Ruby process exits, making it unreliable for critical schedules without external persistence mechanisms.
Requires careful setup in forking environments like Passenger or Unicorn to avoid thread duplication, as highlighted in the FAQ with multiple Stack Overflow links warning of job double-triggering.
While lockfile and custom lock schemes are supported, implementing multi-instance scheduling requires manual work, unlike dedicated distributed job queues that handle coordination out of the box.