Home > Language Reference > System Functions > StopService

StopService

The StopService function stops the specified service.

Usage

Used to stop a service.

Syntax

ret = StopService(<service_name>)

Parameters

<service_name>. string, name of the service to stop (case insensitive). 

Return value

ret, optional integer return value. If the service has been successfully stopped, the return value is 0. If the function fails, the return value is a nonzero value (see System Functions Error Codes).

See also

StartService
IsServiceStarted

Example

ret=StopService("WTScheduler") ' Returns 0 if WTScheduler (Service Scheduler) has been correctly stopped.