3

Let assume that I have scaled Heroku application to 1 worker process, but how to specify that the rake task with particular name should run as a worker process?

Paul
  • 25,812
  • 38
  • 124
  • 247

1 Answers1

4

Make a Procfile in your project, and put the rake task within it like so

worker: bundle exec rake my:cool:rake_task

More info here: https://devcenter.heroku.com/articles/procfile

UPDATE (April 2014):

If you want to schedule your rake task like a cron job you could use the Heroku Scheduler

Details are here: https://devcenter.heroku.com/articles/scheduler

gef
  • 7,025
  • 4
  • 41
  • 48