Reputation: 3638
I have a Rails app that I have hosted on Amazon's Elastic Beanstalk. I want to use the Whenever gem to schedule tasks, but both the Whenever gem documentation and the this Railscast mention integration with Capistrano. I'm not using Capistrano for managing my server, so I'm unsure if it mess up how my server operates now, if I install it just for using Whenever.
Perhaps another way of asking my question is what does including this command in Capistrano's deploy.rb file do, and is there a replacement for doing this if I don't use Capistrano:
set :whenever_command, "bundle exec whenever"
require "whenever/capistrano"
Upvotes: 4
Views: 1044
Reputation: 3638
I read this thread in the Whenever gem Google Group and I figured out that you can use Whenever without Capistrano, but that means you need to trigger the Crontab manually instead of Capistrano triggering the change. To do so, use this command on your server:
whenever -i
Upvotes: 8
Reputation: 17480
Based on the documentation, no, you don't have to use Capistrano.
Whenever Capistrano does the following, which registers a couple hooks for running whenever tasks during deployment
Capistrano::Configuration.instance(:must_exist).load do
# Write the new cron jobs near the end.
before "deploy:finalize_update", "whenever:update_crontab"
# If anything goes wrong, undo.
after "deploy:rollback", "whenever:update_crontab"
end
Upvotes: 0