0

I deployed my python script on Heroku and trying to setup scheduler to run it every hour.

My Procfile:

run: cd src && python3 main.py

I scale this dyno with:

heroku ps:scale run=1

And in heroku scheduler I set it for run every hour with command

run

Deploy and I think that it will runs every hour, but it runs more often than I expect, every 10-15 minutes, how can I solve it?

1 Answer 1

3

Scale your "run" process type down to 0 with heroku ps:scale run=0. Thern, make sure you can run it in a one-off dyno, e.g. with heroku run python src/main.py.

Then in Heroku Scheduler configure the exact same command that you used to run it in a one-off dyno, and configure your required frequency (i.e. "Hourly").

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.