I have a python script that runs continuously on a server using a ‘while true’ loop. This script gets started and stopped arbitrarily and can’t be scheduled.
I would like to control it from a flask app - a single page application that just has a button to toggle the script to either start or stop depending on its current status.
I have the flask app, and I have the script, but I can’t figure out how to run the script separately - outside of the flask app.