For whenever gem Default Rails environment is
production. However, you sometime would like to set environment manually for testing purposes.
If you try
$ whenever -h Usage: whenever [options] -s, --set [variables] Example: --set 'environment=staging&path=/my/sweet/path'
if you need to set environment to development then try this
$ whenever --update-crontab --set 'environment=development'
# In schedule.rb # run this task only on servers with the :app role in Capistrano # see Capistrano roles section below # variable `environment` is accessible here; you set from CLI set :whenever_environment, environment || 'production' every :day, :at => '12:20am', :roles => [:app] do rake "app_server:task" end
You can list installed cron jobs using