I have a Rails app on Heroku and sometimes I use heroku run
command that spawns one-off dyno and other times I want to run two 1x dyno
so my app can run only 375 hrs for free. I don't want to spend money for my test app. I would rather prefer it to stop. Is there a way to achieve it? My credit card is linked to Heroku because I use some free addons that require its presence (such as sendgrid
).
You can't turn them off automatically, but you can scale your dynos to 0 (zero) when you near the end of your 750 hours.
heroku ps:scale web=0 # Given you dynos are 'web' dynos