Heroku dyno scaler on the cheap. For use with Heroku Scheduler addon or cron. A quick hack.
Ruby
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
.rvmrc
Gemfile
Gemfile.lock
README.md
heroku-scaler.rb

README.md

thief-in-the-night

Heroku dyno auto scaler on the cheap. For use with the Heroku Scheduler addon or something cron like.

Setup

First create a new Heroku app.

Add the following add-ons to your new app:

Add your Heroku API key as a config variable:

$ heroku config:add HEROKU_API_KEY=xxx

Add a e-mail to send error reports to if the scaling fails:

$ heroku config:add ERROR_REPORT_EMAIL=hello@example.com

Go to the Heroku Sceduler config page and set up jobs to scale your dynos:

ruby heroku-scaler.rb -a dat-app -t web -d 3 # scale web dynos to 3 for the app dat-app
ruby heroku-scaler.rb -a dat-app -t worker -d 1 # scale worker dynos to 1  for the app dat-app