I followed the instructions in this answer about writing a Python script to be used as a service. I placed my looping code in def main()
.
I installed the service with python my_script.py install
. I was able to Start and Stop the service through services.msc
in Windows XP.
It's a logging program that is intended to write logs as long as Windows is running. It shouldn't care about who or whether anyone logs in or out. My problem is that the service will stop when I logout. How do I make it survive logouts?