I need to create a service from a python script, for this I am using NSSM(Non-sucking service manager). I am able to install the service using below command: nssm install However when I try to start the service, it gets in Paused state.
nssm start <Service_Name>
When I try to resume/stop/restart from the services.msc it gives error like Windows could not start the service.
The python script I am using is below:
import sys
for i in range(sys.maxsize**10):
with open("D:\PythonWriteFile.txt","a") as myfile:
myfile.write("Appended text")
Please let me know how can I make python script as service.