β° RailsCron β Distributed Cron Scheduler for Rails
First release 0.1.0 is empty gem. A scheduler-agnostic, multi-node-safe cron runner for Ruby and Rails.
Designed and maintained by Codevedas Inc.
π§ Project Structure
This repository contains the RailsCron gem and its documentation site.
/repo-root
βββ .github/ # CI workflows, issue templates
βββ rails_cron/ # Gem source (lib/, bin/, gemspec)
βββ docs/ # Documentation site (Jekyll + Markdown)
βββ README.md # This file
π§© What It Does
rails_cron lets you register, schedule, and safely run recurring tasks across multiple Rails instances.
It ensures exactly-once dispatching per cron tick using distributed locks via Redis or PostgreSQL advisory locks.
Itβs scheduler-agnostic β works with any background job system (ActiveJob, Sidekiq, Resque, etc.)
and provides a clean Ruby API, CLI, and Rails tasks.
π Documentation
Comprehensive guides are published at:
π https://rails-cron.codevedas.com
| Section | Description |
|---|---|
| Overview & Motivation | Why RailsCron exists |
| Installation & Setup | Gem setup and initializer |
| Usage | Registering jobs, CLI, and Rake tasks |
| FAQ / Troubleshooting | Common issues and fixes |
π οΈ Local Development
1. Clone and setup
git clone https://github.com/CodevedasInc/rails-cron.git
cd rails-cron
bundle install2. Run specs
bin/rspec-unit3. Lint and format
bin/rubocop4. Reek
bin/Reekπ§ͺ Running the Gem Locally
You can load a local version of the gem in a test Rails app:
gem build rails_cron.gemspec
gem install ./rails_cron-0.1.0.gemOr reference it directly in another appβs Gemfile:
gem "rails_cron", path: "../rails-cron/rails_cron"π Docs Site (Jekyll)
The docs/ directory is a Jekyll site used for GitHub Pages.
Run locally
cd docs
bundle install
bundle exec jekyll serveThen open: π http://localhost:4000
βοΈ Continuous Integration
GitHub Actions workflows include:
| Workflow | Purpose |
|---|---|
ci.yml |
Runs tests (RSpec + RuboCop) on all Ruby versions |
release.yml |
Builds and publishes gem to RubyGems |
jekyll-gh-pages.yml |
Builds and deploys docs to GitHub Pages |
Contributing, Security, Conduct
- Contributing: see CONTRIBUTING.md
- Security policy: see SECURITY.md
- Code of Conduct: see CODE_OF_CONDUCT.md
π License
Released under the MIT License Β© 2025 Codevedas Inc. β All rights reserved.