fix dt.today() for executing in time.

This commit is contained in:
Rykov7
2022-08-25 12:25:58 +03:00
parent 8070e3a1f5
commit cfc81899e8
2 changed files with 6 additions and 4 deletions
+4 -2
View File
@@ -16,9 +16,11 @@ def scheduler():
time.sleep(300)
@repeat(every().day.at('06:00'))
def remind(chat_to_repeat=PYTHONCHATRU, today=dt.today()):
@repeat(every().day.at('06:00'), PYTHONCHATRU, None)
def remind(chat_to_repeat, today):
""" Remind holiday. """
if not today:
today = dt.today()
with open('holidays.csv', newline='', encoding='utf-8') as holidays_file:
holidays = tuple(csv.reader(holidays_file))[1:]
for entry in holidays: