javan-whenever with ec2onrails
After reading the Railscast about javan-whenever, a great ruby gem that allows you to write cron jobs in highly readable ruby with an impossible to forget syntax (compared to the daunting obliqueness of straight cron), I tried to get it running with a site I am working on that is deployed by Capistrano to ec2 with ec2onrails and requires a number of cron jobs. Troglodyte that I am, it took much headslamming, hair-pulling and full-fledged teary breakdowns before I finally email the person who wrote the gem and he suggested that Capistrano was probably issuing the command as another user other than the one I was trying to get a crontab for. Argh! With his suggestion, this is what I finally found did the job:
Apparently, there is also a -user option in whenever that can be used to accomplish similar goals….
I am available for Ruby on Rails consulting work – get in touch to learn more.