Using javan/whenever on Engine Yard Cloud
Originally published at Sara Trice. You can comment here or there.
UPDATE 4.17.2012: If you're on EY and not using custom chef recipes, you should start. A whenever recipe has been written and is detailed here. Info on how to start using custom chef recipes is here. It's not so bad, really. One gotcha: your "appname" in the recipe is not your rails application name, but your EY application name - these can be different things!
Things I wish I’d have known:
1. It does not matter if whenever is in your gemfile, you have to SSH to your EY server and install whenever as such: sudo gem install whenever
2. It will probably complain that you don’t have i18n installed, so: sudo gem install i18n
EDIT: You will have to repeat the two steps above ANYTIME you restart your EY instance!
3. If you want your crontab updated on deploy, make a file named deploy/before_restart.rb and stick this in it (make sure you replace ‘yourAppNameHere’, derp):
@rails_env = node[:environment][:framework_env] run "cd #{release_path}; whenever --set environment=#{@rails_env}; whenever --update-crontab 'yourAppNameHere'"
This is called a ‘deploy hook’ and here’s more info.
I found the idea for this in an old EY forum post.