Compare commits

..

2 Commits

Author SHA1 Message Date
wiktor
496450325e Merge branch 'main' of https://git.coopcloud.tech/knoflook/bbbbbs 2022-12-09 13:55:36 +01:00
wiktor
00f1812d74 .\timeScheduler.py 2022-12-09 13:55:06 +01:00

20
timeScheduler.py Normal file
View File

@ -0,0 +1,20 @@
import datetime
import time
#print (now.strftime("%Y-%m-%d %H:%M"))
data = "2022-12-09"
czas = "13:52"
def check(date, inputTime):
strDate = date.split('-')
strTime = inputTime.split(':')
isPlayed = False
while True:
now = datetime.datetime.now()
if isPlayed == False and int(strDate[0]) == int(now.year) and int(strDate[1]) == int(now.month) and int(strDate[2]) == int(now.day) and int(strTime[0]) == int(now.hour) and int(strTime[1]) == int(now.minute):
isPlayed =True
print (now.strftime("%Y-%m-%d %H:%M:%S"))
time.sleep(1)
check(data, czas)