import os import subprocess import time gitbash = r"C:\Program Files\Git\git-bash.exe" # Eventuell anpassen! backupscript = r"D:\stickbackup2.bash" # Eventuell anpassen! while True: # Check if stick is present if os.path.exists(backupscript): print("Stick present") # Backup starten print("Starte backup...") cmd = [gitbash, backupscript] subprocess.call(cmd) time.sleep(30*60) # Halbe Stunde else: print("nix da!") time.sleep(10)