I wanted a way to scale up and down the dynos in Heroku based on time of day.
To do so, I added the scheduler add-on to heroku heroku addons:add scheduler
In my Rails app, I added the scale_dynos.rake file in /lib/tasks/ and the following line to the Gemfile:
gem 'heroku-api', '~> 0.3.17', :require => false
Now I can run heroku run rake scale_dynos:up
(and down
) through the command line, as well as scheduling the command rake scale_dynos:up
in the Scheduler add-on.
a