[Machine] Service Control

This module allows you to take action on the services which are installed or are running on the local machine. This can be used in response to other steps in a job to start, stop or restart specific services. You may be asking what type of situations would you want to control various services on the machine? One example would be if you have a service from some third party vendor that might have a memory leak or some other resource problem with it. By using this in conjunction with the scheduler, you could periodically shutdown and restart the service to force it to release resources.

The parameters that the module uses are detailed in the following table.

Parameter I/O Description
ServiceName In The name of the service. Must be entered exactly as it appears in the list of services in the Microsoft Windows control applet.
Operation In Start: Starts a service that is not already running. It has no effect on a service that is already running.
Stop: Stops a service that is currently running. It has no effect on a service that is already stopped.
Restart: Stops the service, then starts it back up again. If the service was not already running, this will effectively just start the service.
TimeoutSeconds In This defaults to 180 seconds or three minutes. This should give many services adequate time to do as requested. If the service does not respond as requested within this timeout, the step will potentially end and continue onto the next step, if any, before the service has responded as requested. Thus, if you are attempting to use this on a service that is known to take longer to respond to shutdowns, such as a busy Microsoft Exchange server, then this timeout value should be adjusted up to a more reasonable value for that service. This option has an effective minimum value of 30 seconds.
LogOutputLevel In Minimal: Normal output to the log.
Verbose: More detailed output is written to the log, suitable for debugging purposes.
Result Out Returns a zero value if the operation cannot complete within the specified timeout period. Otherwise, the elapsed number of seconds that the service took to respond to the request is returned by this value.