This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Setting variables on the fly
If you wish to override variables in your schedule.rb file at runtime you can do so using the --set option. This is especially useful for changing your environment when deploying to a staging server or something similar.
Example:
whenever --set environment=staging
You can set more than one variable by forming a query string. Make sure to use quotes.
whenever --set 'environment=staging&cron_log=/my/other/log.txt'
So you can define different tasks per environment:
case @environment
when 'production'
every 1.day, :at => "#{Time.parse('12:00 A').getlocal.strftime("%H:%M")}" do
runner "Company.send_later(:create_daily_stories!)"
end
when 'staging'
every 15.minutes do
command "thinking_sphinx_searchd reindex"
end
end







