title: How to autostart Rails delayed jobs?
body: <p>I'm using <a href="https://github.com/collectiveidea/delayed_job#readme" rel="nofollow">delayed job</a> to create job queues such as 'mailer'</p>
  
  <p>For this to work I have to run this:</p>
  
  <pre><code>$ RAILS_ENV=development QUEUE=mailer rake jobs:work
  </code></pre>
  
  <p>But if the server crashes and is restarted, I need the worker to start running again automatically.</p>
  
  <p>What would be the recommended way to deal with this?</p>