I'm trying to make a notifier at an exact time Here's the code:
from win10toast import ToastNotifier
from datetime import datetime
now = datetime.now()
toaster = ToastNotifier()
while True:
if now.strftime('%I:%M %p') == "1:23 PM":
toaster.show_toast("Bot:","It's 1:23 PM")
elif now.strftime('%I:%M %p') == "4:43 PM":
toaster.show_toast("Bot:","It's 4:43 PM")
elif now.strftime('%I:%M %p') == "7:32 PM":
toaster.show_toast("Bot:","It's 7:32 PM")
elif now.strftime('%I:%M %p') == "8:44 PM":
toaster.show_toast("Bot:","It's 8:44 PM")
elif now.strftime('%I:%M %p') == "6:02 AM":
toaster.show_toast("Bot:","It's 6:02 AM")
But when I run the code yesterday, the notification shows forever, and when I close it, it shows again. Please help me fix this and thank you!