Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I use Rails Whenever gem without Capistrano?

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"
like image 957
yellowreign Avatar asked Feb 18 '23 11:02

yellowreign


1 Answers

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

like image 110
yellowreign Avatar answered Feb 20 '23 15:02

yellowreign