开发者

Registering a Python program as a Windows Server 2003 R2 Service

I wrote a Python script that I need to have installed on Windows Server 2003 R2, that will run when a specif开发者_如何学编程ic directory is changed in any way (new files, deleted files, etc). I believe I need to register this as a system service, in order to listen for that, but I'm really not sure.

So, my question is this: does such a script need to be registered as a service, and if so, how do I go about doing that?

Thanks.


I believe your program will have to watch the directory for changes and act according. Alternatively, you could have a separate program watch the directory and then invoke your script, but this is essentially the same.

Tim Golden has an article here which discusses directory watching using python and the win32 api.

After you get that working, it would be very appropriate to have your program run as a service. This has been covered before.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜