[python-win32] Set service to auto restart
Maxwell Grady
mgrady at enthought.com
Tue Sep 17 17:56:29 EDT 2019
I have a python windows service defined as a subclass of
win32serviceutil.ServiceFramework.
I can install the service via the command line via `python -m myservice
--interactive --startup auto install`
Doing so, I can set some of the service configuration such as to run in
interactive mode and to automatically start the service on system start.
Is it also possible to pass in configuration for how the service should
handle failure? specifically I want to set the service to always restart on
failure.
If not via the command line, is there a programmatic way to do this? I know
it can be set manually by opening services.msc and adjusting the service
configuration but was hoping it was also exposed via pywin32.
Thanks for any tips
_______________
Maxwell Grady, PhD
Scientific Software Developer | Enthought
T +1 512 536 1058 x155
M +1 314 814 5471
m <name at enthought.com>grady at enthought.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20190917/308c8431/attachment.html>
More information about the python-win32
mailing list