Skip to content

Commit 2a0ffe8

Browse files
committed
fixed notifications if the user's machine was powered on after the scheduled time had past
1 parent 1690263 commit 2a0ffe8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

leeteasy/__main__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import os
22
import time as clock
33
from sys import platform
4+
import datetime
45

56
import click
67
import schedule
@@ -31,6 +32,10 @@ def execute_start(time, difficulty, sleep_duration) -> None:
3132
Example: leeteasy 13:15
3233
"""
3334
TimeValidator.validate(time)
35+
36+
if datetime.now().time() > TimeValidator.validate(time): #To notify users of missed notifications
37+
Notifier.notify()
38+
3439
Notifier.target_difficulty.append(difficulty)
3540
schedule.every().day.at(time).do(Notifier.notify)
3641

0 commit comments

Comments
 (0)