-3

I tried to make a program that reminds me of a specific time everyday with a notification, there is no errors, but the code doesn't work and I really don't know how to solve this. This is the code:

import schedule
from plyer import notification


def send_notification():
    notification.notify(
    title = "Take A Break!!!",
    timeout = 10
    )
while True:
    schedule.every().day.at("07:00").do(send_notification)

1 Answers1

0

Take a look at the docs, you using the package wrong:

import schedule
import time
from plyer import notification


def send_notification():
    notification.notify(
    title = "Take A Break!!!",
    timeout = 10
    )

schedule.every().day.at("07:00").do(send_notification)

while True:
    schedule.run_pending()
    time.sleep(1)
Sven Eberth
  • 3,057
  • 12
  • 24
  • 29