<commit_before>== Introduction

Whenever is a Ruby gem that provides a clear syntax for defining cron jobs. It outputs valid cron syntax and can even write your crontab file for you. It is designed to work well with Rails applications and can be deployed with Capistrano. Whenever works fine independently as well.

== Installation

Regular (non-Rails) install:
  
  $ gem sources -a http://gems.github.com  #you only need to run this once
  $ sudo gem install javan-whenever

In a Rails (2.1 or greater) application:
  
in your "config/environment.rb" file:

  Rails::Initializer.run do |config|
    config.gem 'javan-whenever', :lib => false, :version => '>= 0.1.7' :source => 'http://gems.github.com'
  end
  
To install this gem (and all other missing gem dependencies), run rake gems:install (use sudo if necessary).

In older versions of Rails:

  $ gem sources -a http://gems.github.com  #you only need to run this once
  $ gem install javan-whenever

in your "config/environment.rb" file:

  Rails::Initializer.run do |config|
    ...
  end

  require 'whenever'
  
NOTE: Requiring the whenever gem inside your Rails application is technically optional. However, if you plan to use something like Capistrano to automatically deploy and write your crontab file, you'll need to have the gem installed on your servers, and requiring it in your app is one way to ensure this.

== Getting started

  $ cd /my/rails/app
  $ wheneverize .

This will create an initial "config/schedule.rb" file you.

== Example schedule.rb file
  
  every 3.hours do
    runner "MyModel.some_process"       
    rake "my:rake:task"                 <commit_msg>added missing comma. [#1 state:resolved]<commit_after>== Introduction

Whenever is a Ruby gem that provides a clear syntax for defining cron jobs. It outputs valid cron syntax and can even write your crontab file for you. It is designed to work well with Rails applications and can be deployed with Capistrano. Whenever works fine independently as well.

== Installation

Regular (non-Rails) install:
  
  $ gem sources -a http://gems.github.com  #you only need to run this once
  $ sudo gem install javan-whenever

In a Rails (2.1 or greater) application:
  
in your "config/environment.rb" file:

  Rails::Initializer.run do |config|
    config.gem 'javan-whenever', :lib => false, :version => '>= 0.1.7', :source => 'http://gems.github.com'
  end
  
To install this gem (and all other missing gem dependencies), run rake gems:install (use sudo if necessary).

In older versions of Rails:

  $ gem sources -a http://gems.github.com  #you only need to run this once
  $ gem install javan-whenever

in your "config/environment.rb" file:

  Rails::Initializer.run do |config|
    ...
  end

  require 'whenever'
  
NOTE: Requiring the whenever gem inside your Rails application is technically optional. However, if you plan to use something like Capistrano to automatically deploy and write your crontab file, you'll need to have the gem installed on your servers, and requiring it in your app is one way to ensure this.

== Getting started

  $ cd /my/rails/app
  $ wheneverize .

This will create an initial "config/schedule.rb" file you.

== Example schedule.rb file
  
  every 3.hours do
    runner "MyModel.some_process"       
    rake "my:rake:task"                 
{'fraction_non_alphanumeric': 0.08082026537997587, 'fraction_numerical': 0.0039203860072376355, 'mean_word_length': 3.4463806970509383, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5670746', 'n_tokens_mistral': 976, 'n_tokens_neox': 922, 'n_words': 430}