whatisgithub

What is whenever?

javan/whenever — explained in plain English

Analysis updated 2026-06-24

8,871RubyAudience · developerComplexity · 2/5Setup · easy

In one sentence

Whenever is a Ruby gem that lets you write recurring server tasks in plain readable Ruby syntax instead of cryptic cron expressions, then converts them into standard crontab entries automatically.

Mindmap

mindmap
  root((whenever))
    What it does
      Readable cron syntax
      Generates crontab
      Rails scheduling
    Schedule Styles
      every 3.hours
      every :sunday
      every 1.day at time
    Job Types
      Shell command
      Rake task
      Rails runner
    Integrations
      Capistrano deploy
      Multi-environment
      Email output config
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Schedule a nightly database cleanup task in a Rails app using readable Ruby syntax like 'every 1.day, at: 4am'.

USE CASE 2

Set up a recurring Rake task to send a digest email every Sunday at noon.

USE CASE 3

Automatically update the server's crontab whenever you deploy a Rails app using Capistrano.

USE CASE 4

Run a shell command every 3 hours using a clean schedule.rb file instead of editing crontab manually.

What is it built with?

RubyRuby on RailsCapistrano

How does it compare?

javan/wheneverankane/pgherocarrierwaveuploader/carrierwave
Stars8,8718,8608,776
LanguageRubyRubyRuby
Setup difficultyeasymoderateeasy
Complexity2/53/52/5
Audiencedeveloperops devopsdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Requires Ruby and Bundler, Capistrano integration needs additional configuration in your deploy.rb file.

License information is not described in the explanation.

So what is it?

Whenever is a Ruby gem that makes it easier to write and manage scheduled tasks on a server. Scheduled tasks are jobs you want the server to run automatically on a recurring basis, like generating a nightly report, clearing old records from a database, or sending a digest email every morning. On Unix and Linux servers, this scheduling is traditionally handled by a system called cron, which runs commands at specified intervals. The problem with cron is that its native syntax is terse and hard to read. Whenever lets you define those same schedules in plain Ruby code using a more readable style. Instead of cryptic cron expressions, you write things like every 3.hours, every :sunday, at: '12pm', or every 1.day, at: '4:30 am'. You put these definitions in a file called schedule.rb, then run the whenever command to convert them into standard cron syntax and write that into the server's crontab file. The gem ships with three built-in job types: running a shell command directly, running a Rake task (a common way Ruby apps define utility scripts), and running code inside a Rails application. You can also define custom job types if your project has a different kind of recurring task. Whenever also integrates with Capistrano, a deployment tool popular with Ruby on Rails projects, so that the crontab file on the server can be automatically updated whenever you deploy new code. This avoids the common problem of deployment and scheduled tasks falling out of sync. The README is thorough and covers time parsing options, email configuration for job output, comment annotations, and multi-environment setups. The full README is longer than what was shown.

Copy-paste prompts

Prompt 1
Write a schedule.rb file using Whenever to run a Rails rake task every day at 6am and a cleanup task every Sunday.
Prompt 2
Show me how to integrate Whenever with Capistrano so cron jobs update automatically on every deploy.
Prompt 3
Convert this cron expression '0 */3 * * * /usr/bin/ruby /app/script/run.rb' into Whenever syntax.
Prompt 4
How do I define a custom job type in Whenever for a background task that is not a Rake task or shell command?
Prompt 5
Set up Whenever to send a digest email every Sunday at noon using a Rails mailer method call.

Frequently asked questions

What is whenever?

Whenever is a Ruby gem that lets you write recurring server tasks in plain readable Ruby syntax instead of cryptic cron expressions, then converts them into standard crontab entries automatically.

What language is whenever written in?

Mainly Ruby. The stack also includes Ruby, Ruby on Rails, Capistrano.

What license does whenever use?

License information is not described in the explanation.

How hard is whenever to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is whenever for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.