Search code examples
ruby-on-railsrubyruby-on-rails-4croncron-task

Run Cronjob (or equivalent) in Rails 4 App for Continuous/repetitve Tasks


TASK

I want to go through any new records inserted into the database (MySQL) and email them to a personal email address and then mark them as emailed when done. I'd like to do this via a custom written ruby/rails script that is ran via cron (or equivalent).

Q

What is the rails way (best way) to run a cronjob every night?


Solution

  • The gem whenever helps you create cron jobs with Rails.