Make A Bed Time Reminder Using Python | Tkinter | Windows Task Scheduler | Create Popup With Python
This is a bedtime reminder window. it is built using Python and is scheduled using the Windows task scheduler. It pops up every 5 minutes at night and reminds us to go to bed.
let's start building it. let's create a file with an extension.PYW. Let's check if this works. now we can start writing the code. first, we will import the tkinter library and the time library. let's create a window of Tkinter. Now let's add a text inside the window, named label. It will have the test time to sleep. This does not get displayed until the label is packed.
Now the label is displayed. But the window name is displayed as tk.
let's change the label to bedtime reminder. Now let's change the position of the window, and shift it to be displayed at the bottom right corner of the screen. Now we are able to see the expected window with the required message. but if we click anywhere on another window then this window goes behind. We will add a window attribute to keep this window at the top. Now even if we click on another window this bedtime reminder window in remains on top. As we run the code a window with a sleeping reminder message is displayed, but this code runs indefinitely, it does not have a stop. To stop it we will have to close it manually by clicking on the close icon. To resolve this issue we will add a destroy statement which will close the window after 5000 mili seconds or 5 seconds. we can modify the time to make the window stay on the screen longer. now it is working and we are good to proceed with the next step of scheduling this task from the Windows task scheduler. Then it will pop up at the time specified and remind me to sleep.
Open Windows task scheduler. Click on Create task. In the General tab provide basic the task name and description. Go to the triggers tab and click on new. The trigger scheduled show is to run or start a task from the 1st of January 2024 at 10 pm, this task will start a program every 5 minutes for the next 1 hour, that means till 11 pm. Change the parameters as per your requirements. Now go to the Actions tab and click on new.
in action select Start a program. for the Program/script browse the path of the python .pyw file. Click okay and we are good to go.
Now as we just have to wait and watch, at the correct time the sleep reminder will appear automatically. It will be on top of all the other windows open. And it will remind us to go to bed. So go to bed on time and don't waste your time watching videos in incognito mode.
For more related videos kindly visit: https://www.youtube.com/channel/UCazrKkpP-YGTT8O3bSsHPVw
Subscribe for more updates: https://www.youtube.com/channel/UCazrKkpP-YGTT8O3bSsHPVw?sub_confirmation=1
Python EveryDay !!!
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Make A Bed Time Reminder Using Python | Tkinter | Windows Task Scheduler | Create Popup With Python», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.