I made a .pyw python script that I want to have running in the background of my computer.
Right now I have it set to launch by putting it in the Startup folder of my Windows 7 computer, which should trigger it to launch whenever it starts up.
The problem is that the script seems to stop running at some point for some reason. I think it simply stops when my computer goes to sleep and doesn't start running again afterwards.
Is there a "more correct" way to have a background task running that wouldn't have it die every time the computer goes to sleep?
If there really is need for a continuously running background process, you should look into making a service.
pywin32 helps in creating NT services with python
If you're into .NET, you can try also IronPython , but I don't know whether that is more easy.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.