3

I want to run a service in windows which will keep running in background and will run a cron with specific time.
how i can do that in windows using python?

sam
  • 979
  • 1
  • 7
  • 4
  • 1
    See {Creating a python win32 service}(http://stackoverflow.com/questions/263296/creating-a-python-win32-service). – martineau Dec 14 '10 at 08:43

3 Answers3

3

Use pywin32. A tutorial was written (in 2005 mind you) here about how one might do that.

Rafe Kettler
  • 75,757
  • 21
  • 156
  • 151
1

Make sure win32 api is installed. Basically, you subclass the BasicNTService. The win32 package docs has some more information. I also have a working example in some code I wrote that does this. WindowsServer.py that also mixes in Pyro for a Python remote control agent.

Keith
  • 42,110
  • 11
  • 57
  • 76
0

A combination of cx_freeze and srvany could do the job.

See this for srvany usage (replace dropbox with your exe)

Community
  • 1
  • 1