I am trying to run a command to run a one-off dyno once per hour for my app. All it does is run my code as a jar file and then sleep until the next hour when it runs again.
My current scheduler command to run is
heroku run:detached java -jar TwitterAutoBot.jar
TwitterAutoBot.jar
is the jar file that is my code to run. This command that I use for the scheduler works in git bash. The program runs perfectly then stops. But when it attempts the command with the scheduler, it says
Cannot run more than 1 Free size dynos
Running heroku ps
shows that there are no active dynos for this app.
The scheduler launches a one-off dyno when it runs your command. And your command tries to launch another (via heroku run
). Try this command instead:
java -jar TwitterAutoBot.jar