Home:ALL Converter>Running python script with heroku bash continuously

Running python script with heroku bash continuously

Ask Time:2020-11-13T00:26:01         Author:Bilgi Nehri

Json Formatter

I have a script that requires 2 two inputs that are not the same every time. So I have to give the input manually every time I run the script. And I do want to deploy this script to Heroku. But unfortunately, I can't give any kind of input manually in heroku:worker. I can't use any kind of environment variables, arguments because these 2 inputs are not static. So heroku:worker just keeps getting the 'There are no inputs' error.

So I have decided to run the script with the command heroku run python3 main.py but no matter what I do I couldn't get out of the terminal without ending the process. I want this script to run continuously even if I get out of the terminal.

So how can I run the python script in Heroku continuously and quit the terminal without breaking the process?

Author:Bilgi Nehri,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/64807754/running-python-script-with-heroku-bash-continuously
yy