How to run Heroku CLI commands from Heroku Scheduler?

Issue

How to run Heroku CLI commands from Heroku Scheduler? I can install the CLI by the following command, but it requires login when I execute a command.

~ $ curl -s https://cli-assets.heroku.com/heroku-linux-x64.tar.gz | tar xz
~ $ ./heroku/bin/heroku apps:info -a example-app
 ▸    Invalid credentials provided.

Resolution

You'll need to set HEROKU_API_KEY on your app. Please create the token by heroku authorizations:create command in advance.

You can also use Heroku buildpack: Heroku CLI to skip the CLI download.

Ask on Stack Overflow

Engage with a community of passionate experts to get the answers you need

Ask on Stack Overflow

Heroku Support

Create a support ticket and our support experts will get back to you

Contact Heroku Support
Terms of Service Privacy Cookies © 2019 Salesforce.com