|
|
@ -1,15 +1,20 @@ |
|
|
from dateutil.parser import parse |
|
|
from dateutil.parser import parse |
|
|
|
|
|
import sys |
|
|
|
|
|
import os |
|
|
|
|
|
PARENT = os.path.dirname(__file__) |
|
|
|
|
|
sys.path.insert(0,PARENT) |
|
|
from upload import upload |
|
|
from upload import upload |
|
|
import datetime |
|
|
import datetime |
|
|
import os |
|
|
|
|
|
import subprocess |
|
|
import subprocess |
|
|
import time |
|
|
import time |
|
|
from upload import upload |
|
|
from upload import upload |
|
|
t = parse(input("Enter endtime: ")) |
|
|
t = parse(input("Enter endtime: ")) |
|
|
wait = (t-datetime.datetime.today()).seconds |
|
|
|
|
|
subprocess.call(['timeout.exe','/nobreak',str(wait)]) |
|
|
|
|
|
|
|
|
wait = int((t-datetime.datetime.today()).total_seconds()) |
|
|
|
|
|
if wait > 0: |
|
|
|
|
|
subprocess.call(['timeout.exe','/nobreak',str(wait)]) |
|
|
|
|
|
subprocess.call([os.path.join(PARENT,'done.bat')]) |
|
|
upload() |
|
|
upload() |
|
|
print("Logging off in ") |
|
|
print("Logging off in ") |
|
|
for i in range(10,-1,-1): |
|
|
|
|
|
|
|
|
for i in range(10,0,-1): |
|
|
print(i) |
|
|
print(i) |
|
|
time.sleep(1) |
|
|
time.sleep(1) |