I already searched several solutions on this site, but unfortunately the provided ones didn't work out for me.
Let's say I have a python script called "DataGen.py" that stops running (green arrow is clickable) because some background program is crashing. Unfortunately, there is no exception being thrown, which is why I need a workaround:
What I'm searching for is another python script called "RestartScript.py" that restarts "DataGen.py" 60 seconds after it has stopped running.
I tried something like:
from os import system
from time import sleep
while True:
system('DataGen.py')
sleep(300)