Project

rails_cron

0.0
No release in over 3 years
There's a lot of open issues
Rails Cron is a Ruby gem that simplifies the management of cron jobs in Rails applications, providing an easy-to-use interface for scheduling and monitoring background tasks.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

>= 7.1, < 9.0
 Project Readme

⏰ 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.

Gem CI Maintainability Code Coverage License PostgreSQL Redis


🧭 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 install

2. Run specs

bin/rspec-unit

3. Lint and format

bin/rubocop

4. 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.gem

Or 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 serve

Then 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


πŸ“„ License

Released under the MIT License Β© 2025 Codevedas Inc. β€” All rights reserved.