如何让一个程序在python每天的特定时间提醒我?

how to make a program remind me in a specific time everyday in python?

我试着做了一个程序,每天提醒我一个特定的时间,并有一个通知,没有错误,但是代码不起作用,我真的不知道如何解决这个问题。 这是代码:

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)

看看docs,你使用的包错了:

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)