py-reminder/run.py

22 lines
525 B
Python
Raw Permalink Normal View History

2019-07-01 10:18:34 +00:00
from schedule import Scheduler
from notify import show_notification
import datetime
import time
def notify_hello():
show_notification("Hello world", "test")
if __name__ == "__main__":
_scheduler = Scheduler()
# _scheduler.every(datetime.timedelta(seconds=3), lambda: print("Hello"))
# _scheduler.at(datetime.timedelta(seconds=5), lambda: print("Should run only once"))
_scheduler.at(datetime.datetime(2019, 7, 1, 12, 4), notify_hello)
while True:
_scheduler.run()
time.sleep(1)