Python Forum

Full Version: Schedule exit a program at a specific time 4 am every day.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a script, but it stops responding after 2 weeks or so, so now i am using task manager in windows to start the script every day at 5am. Can someone help me code to schedule to exit the program gracefully at 4am ? (no matter what time it starts but to shutdown gracefully at 4am)
or if someone can provide me with a script to end a python script gracefully , so i can then schedule this task in windows 11 with task scheduler. so it can end the python script gracefully.
(May-17-2024, 03:31 AM)chubbychub Wrote: [ -> ]if someone can provide me with a script to end a python script gracefully
What do you mean by 'end a python script gracefully'? Why not just kill the process?
terminating the program or killing the script, leaves me a ghost icon in the taskbar (from reading and googling) hence i want to exit the program and clear the resources so there is no ghosting icon in the taskbar.