Compare commits
2 Commits
bc40e24571
...
496450325e
Author | SHA1 | Date | |
---|---|---|---|
|
496450325e | ||
|
00f1812d74 |
20
timeScheduler.py
Normal file
20
timeScheduler.py
Normal 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)
|
Loading…
Reference in New Issue
Block a user