Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm in the process of developing a Rails app that I plan on subsequently deploying to Heroku. I've never run apps on Heroku (outside of the free simple app) so I have some questions on a few things on how I should architect some aspects of my app to run.

I want a service to run on a schedule to check for inactive users to send a 'we haven't seen you in a while' type of email. Would this just be it's own worker dyno in Heroku? Or would that be integrated into the web app as a background job of sorts?

In relation to that, I will have a worker dyno that will handle sending account confirmation emails, among other random emails, would it make sense to have that operation be coupled with the process above? Or would it have to be a completely separate dyno?

I've done plenty of this type of work in .Net hence some of my confusion on this switch to Rails.

share|improve this question
up vote 2 down vote accepted

The "Heroku way" looks to be the use of Heroku's custom clock processes, coupled with a Ruby gem to interface with the clock process such as Clockwork.

(There is also a way to run less strict scheduled jobs, the Heroku Scheduler. ("Scheduler is a best-effort service. There is no guarantee that jobs will execute at their scheduled time, or at all. Scheduler has a known issue whereby scheduled processes are occasionally skipped. An alternative to Heroku Scheduler is to run your own custom clock process."))

share|improve this answer
That does seem like what I was looking for. I'm assuming that Clockwork gem would run under it's own worker dyno as it looks like it's being setup as it's own separate app from the web app. – Justin Chmura May 28 '13 at 14:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.