Windows Service Restarts Scheduling

Main.WindowsServiceRestartsScheduling History

Hide minor edits - Show changes to output

Changed lines 32-39 from:
net rpc service list View configured Win32 services
net rpc service start Start a service
net rpc service stop Stop a service
net rpc service pause Pause a service
net rpc service resume Resume a paused service
net rpc service status View current status of a service
net rpc service delete Delete a service
net rpc service create Create a service
to:
net rpc service list View configured Win32 services
net rpc service start Start a service
net rpc service stop Stop a service
net rpc service pause Pause a service
net rpc service resume Resume a paused service
net rpc service status View current status of a service
net rpc service delete Delete a service
net rpc service create Create a service
Added lines 29-40:

Usage:

net rpc service list View configured Win32 services
net rpc service start Start a service
net rpc service stop Stop a service
net rpc service pause Pause a service
net rpc service resume Resume a paused service
net rpc service status View current status of a service
net rpc service delete Delete a service
net rpc service create Create a service
Changed lines 16-18 from:
* bat w/ psservice call from SDK
* wbscript w/ WMI
* powershell
to:
* bat w/ psservice call from SDK
* wbscript w/ WMI
* powershell
Deleted lines 0-1:
Changed line 28 from:
# net rpc service [stop,start,restart] [Service] -I [Server] -U Administrator%[password]
to:
# net rpc service [stop,start,restart] [Service] -I [Server] -U Administrator%[password]
Added lines 1-31:


How to schedule services on a windows server


Task: e.g. Restart a certain service once a night.


* Can not be done out the box through task scheduler
* Commercial products available



Do it yourself:

* scripting

* bat w/ psservice call from SDK
* wbscript w/ WMI
* powershell

Syntax of net command:

http://technet.microsoft.com/en-us/library/cc736564(WS.10).aspx#BKMK_cmd

Suggested solution:

* Control Windows service remotely from Unix box:

# net rpc service [stop,start,restart] [Service] -I [Server] -U Administrator%[password]