from dateutil.parser import parse from upload import upload import datetime import os import subprocess import time from upload import upload t = parse(input("Enter endtime: ")) wait = (t-datetime.datetime.today()).seconds subprocess.call(['timeout.exe','/nobreak',str(wait)]) upload() print("Logging off in ") for i in range(10,-1,-1): print(i) time.sleep(1)