import subprocess import time while True: process = subprocess.Popen(["python3", "revivetube.py"]) process.wait() time.sleep(1)