Overview & Motivation
Kaal is a distributed cron scheduler for Ruby, packaged as a core engine plus datastore and framework integration gems.
It exists to solve one problem cleanly: coordinate recurring work across processes or nodes without duplicating scheduler dispatches.
What it owns
Kaal handles:
- cron parsing and next-fire calculation
- recurring job registration
- scheduler ticking and coordination
- shared-backend dispatch tracking
- deterministic
idempotency_keygeneration for downstream dedupe
Kaal does not require a specific job system. Your callback can enqueue Active Job, Sidekiq, Resque, or your own service object.
Why Kaal
- plain Ruby runtime with no framework requirement
- package boundaries split between engine, datastore adapters, and framework integrations
- memory and Redis support in the core gem
- Sequel and Active Record SQL adapter paths
- CLI tools for setup and operations
- documented at-most-once dispatch guarantee for supported shared backends
Package roles
kaalCore engine, runtime coordination, CLI, memory backend, and Redis backend.kaal-sequelSequel-backed SQL datastore adapter for plain Ruby or framework integrations built on Sequel.kaal-activerecordActive Record-backed SQL datastore adapter for plain Ruby and Rails-backed installs.kaal-railsRails integration that builds onkaalandkaal-activerecord.kaal-hanamiHanami integration that builds onkaalandkaal-sequel.kaal-rodaRoda integration that builds onkaalandkaal-sequel.kaal-sinatraSinatra integration that builds onkaalandkaal-sequel.
Where it fits
Pick the package surface that matches your application:
- plain Ruby + memory or Redis:
kaal - plain Ruby + Sequel SQL:
kaalandkaal-sequel - plain Ruby + Active Record SQL:
kaalandkaal-activerecord - Rails:
kaal-rails - Hanami:
kaal-hanami - Roda:
kaal-roda - Sinatra:
kaal-sinatra
The runtime API remains the same across adapters: define jobs, configure a backend, and run the scheduler.