This will rerun or re-execute the main.py script automatically once it disrupted or killed by any error. When I try to execute the main script multiple times by using TIMES_TO_RUN="n" feature sometimes the script stopped by some errors like timeout or sox not found, then I need to restart the script again and again so I wrote this to automate the restarting part.if anyone wants to rerun the script for n number of times then they can by rewriting the while loop to run exactly n times.pull/672/head
parent
0db05aa683
commit
d19c95acac
@ -0,0 +1,6 @@
|
||||
import os
|
||||
while 1:
|
||||
os.system("python3 main.py")
|
||||
print("Restarting......")
|
||||
|
||||
# if you want to restart the main Script automatically 'n' number of times then rewrite the while loop to run 'n' times.
|
Loading…
Reference in new issue