Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.
/ dynosched Public archive

A small node.js utility to scale Heroku dynos up or down through the use of a scheduler

License

Notifications You must be signed in to change notification settings

afgallo/dynosched

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dynosched

Build Status Codacy Badge Coverage Status

This script uses the Heroku Platform API to scale your Dyno formation up or down. All you need to do is to schedule jobs using the Heroku Scheduler (free!) and set up some env variables. Really handy to keep costs to a minimum (e.g. turn off my dyno at 8 pm and back on again at 7 am next day).

Instructions

1. Set the env variables below using heroku config:set MY_HEROKU_API_TOKEN=***

MY_HEROKU_API_TOKEN=****
APP_NAME=my-app-name
DYNO_TYPE=web
WEB_HIGH=1 // maximum number of processes
WEB_LOW=0 // minimum number of processes
SCALE_DOWN_AT=19 // the hour to scale down your dyno formation in your timezone
TZ='Australia/Sydney'

2. Configure the heroku scheduler add-on to run dynosched

https://devcenter.heroku.com/articles/scheduler

Enjoy!

About

A small node.js utility to scale Heroku dynos up or down through the use of a scheduler

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published