Search code examples
ruby-on-rails-4background-processresque

Background Job and Scheduling with Resque


I have a Ruby on Rails 4.0 and PostgreSQL app hosted in an Ubuntu VPS. in this application I want to send email based on data in the database. for example a background job check a table content per hour and depend on content send email to user or not. I decided to do this work by Resque. how can I do that? should I do in Rails app or in an independent service? and how can I schedule this job?


Solution

  • There are couple of more options I advise you to try to

    1. Cron : One of most preferred approach for any unix developer to run a task based upon some interval . here are read more about

    FYI: if you facing problem with understanding cron settings there are gem available to do the same for you its called whenever

    2. Resque-Scheduler : Surely you missed one of Resque plugins that provide exactly the same feature that you need its called resque-scheduler . It too provide cron like settings for you to work on Please check the above link for more info

    Hope this helps.