Martti Heikkilä
Martti Heikkilä

Reputation: 23

Running "heroku ps:restart" with Heroku Scheduler or in web interface console says "heroku: command not found"

I'm trying to have my dynos restarted every 2 hours or so. I don't have a CLI connection installed or anything like that, I'd like to do this directly in the web interface with Heroku Scheduler.

The web interface has a "Run console" option in the "More" menu. screenshot of the "Run console" input

If I try to run the heroku ps:restart command there, it says:

bash: heroku: command not found

It's the same result if I try to run just ps:restart. And the same result if I put either of those in the Heroku Scheduler.

Is there a way for me to achieve this with Heroku Scheduler? Without setting up extra scripts and authorizations etc. as described here: Schedule Heroku to restart dynos every 10 or so minutes

Upvotes: 1

Views: 925

Answers (1)

Denis Cornehl
Denis Cornehl

Reputation: 4182

The default dyno image doesn't have the Heroku CLI installed. But there is a buildpack you can add on top of your current language buildpack, and you'll have the heroku command in your app.

Upvotes: 2

Related Questions