I am using a bash executable to run a python script in a loop
Sometimes the browser (run by the python script) will stop loading and stop working for hours until I manually come and close the window which will cause the executable to re-run the python script. How can I do this automatically? If no new line is shown in the terminal for 2 mins, then quit python code and run it again.
This is what I have right now:
while true ; do
python3 /Users/Name/Desktop/pythoncode.py
done
It will run the code in a loop. Now I want it to close the code and run it again if no line is outputted in the terminal for 2 mins (the python script shows its progress in the terminal)
Thanks and happy new year