Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Bevan Hunt's Profile

GitHub User: bevanhunt

Comments by Bevan Hunt

Avatar

@Radha - I use it with RVM in my cap recipe and it works fine. You have to ensure to trust all .rvmrc though via the flag or cron will hang (on the github readme for Whenever).

@Joshua:

Q1 -
namespace :deploy do
desc "write the crontab file"
task :write_crontab, :roles => [:whatever] do

run "cd #{release_path} && sudo whenever --load-file config/anyfile.rb --write-crontab #{application}"
end

end

This should work - each role should have its own whenever file - then use a cap task based on role to deploy each crontab. Credit shared with Gordon Isnor (stackoverflow question #1008530).

Q2 - use this gem - https://github.com/deviantech/capistrano-conditional