Search code examples
ruby-on-railsrakeruby-on-rails-plugins

Repeated Rake Task Using Delayed Job


I am currently using the delayed_job gem and I was wondering how to run a rake task every 5 minutes.

I want to run "rake ts:reindex RAILS_ENV=production" every 5 minutes but I'm not sure where to start. I really don't have much more I can say about this because I am VERY inexperienced in this area of rails development.


Solution

  • Use the Whenever gem to schedule your reindexing rake task or any other rake task to run every 5 minutes.

    Its makes it very easy to create Cron jobs like these