title: Scheduling a Delay Job on Heroku with a Worker Dyno
body: <p>I'm currently using Heroku's scheduler to run a script. However, the time that the script takes to run is going to increase from a few milliseconds to a few minutes. I'm looking at using the delayed_job gem to push this process off to a Worker Dyno. I want to continue to run this script once-a-day, just offload it to the worker. My current rake task is: </p>
  
  <pre><code>desc "This task updates some stuff for you."
  task :update_some_stuff =&gt; :environment do
    puts "Updating some stuff ..."
    SomeClass.new.process
    puts "... done."
  end
  </code></pre>
  
  <p>Once the gem is installed, migration run, and worker dyno started, will the script just need to change to: </p>
  
  <pre><code> desc "This task updates some stuff for you."
      task :update_some_stuff =&gt; :environment do
        puts "Updating some stuff ..."
        SomeClass.new.delay.process
        puts "... done."
      end
  </code></pre>
  
  <p>With this task still being a rake task scheduled by Heroku's Scheduler, is the only thing that needs to happen here the introduction of the <code>delay</code> method to put this in the Worker's queue?</p>
  
  <p>Thanks in advance for any help.</p>