Kaal
Kaal is a distributed cron scheduler for Ruby that safely executes scheduled tasks across multiple nodes.
- 📦 gem:
kaal/
Install the gem
# Gemfile
gem 'kaal'
# Install the gem
bundle install
# Generate the initializer and migrations
bin/rails g kaal:install
Links
- Installation & Setup for how to install the
kaalgem, configure it. - Configuration Options for a comprehensive list of configuration options available in the
kaalgem. - Usage & Examples section for detailed guides on configuring and using the
kaalgem. - FAQ / Troubleshooting for answers to common questions and troubleshooting tips when working with the
kaalgem.
Features
- Scheduler-agnostic: Works with any job system (
ActiveJob,Sidekiq,Resque, etc.) - Multi-node safe: Ensures single-dispatch execution across all app instances
- Backend adapters: Redis and Postgres (with in-memory fallback) persist lock coordination, cron definitions, and dispatch records
- Registry & API: Centralized job registration with deterministic idempotency keys
- Dispatch recovery: Replays missed runs within a configurable lookback window
- Cron utilities: Validate, lint, simplify, and humanize via
Kaal.valid?,Kaal.lint,Kaal.simplify, andKaal.to_human - i18n keys: Fully localizable weekdays, months, and time phrases (
kaal.*) - CLI tools:
kaal explain,next,run, and Rails Rake tasks (kaal:start,status, etc.) - Standalone mode: Launch scheduler via Procfile, systemd, or Kubernetes
- Rails integration: Railtie auto-loads configuration and Rake tasks
- Observability: Optional status inspection via
kaal:status - Graceful shutdown: Handles
TERM/INTsignals and finishes current tick cleanly - Testing: Thread-safe, multi-node safety specs included
- Development & CI: Bundler, RSpec, RuboCop, GitHub Actions workflows
- Documentation: README, feature templates, and roadmap included
Professional support
Need help with integrating or customizing kaal for your project? We offer professional support and custom development services. Contact us at sales@codevedas.com for inquiries.
License
MIT © Codevedas Inc.