I want to run python script as a service. I converted My python script to .exe application using pyinstaller and added that application to the service using sc create "service_name" binPath= "path of the script"
but when i am trying to start that service using services.msc then I am getting an error
Error 1053: The service did not respond to the start or control request in a timely fashion
Python Code:
import MySQLdb
db = MySQLdb.connect("host", "user", "pass", "database")
cursor = db.cursor()
cursor.execute("Insert into table(ID,date) Values({},now())".format(10))
db.commit()
cursor.close()
db.close()
can anyone tell me why i am getting this error and how to solve it ?
Note:I am using Windows 7