You can use the Django, it is all very simple and easy to make a web application. With Django you create your web interface to monitor and activate the script.
Django already has a built-in authentication system so you can create a secure interface without work.
With your webapp ready, within the loop of your script you can call a method/function that sends a POST to the webapp "saying it’s okay"
If you wanted a 100% automated process together with Django you can use Celery and create periodic tasks that checks if the script is sending the "all right" if it is not you automatically configure to re-run the script.
You can even go further and use the databases to record logs etc.
In short, you need a service. This web application to trigger a script that must have its own independent life cycle is a bit of a scam. It seems to me that you are a crack coconuts using cannons
– Jefferson Quesado
exact, I will turn this script into a service. Thank you
– Rafael Cabral