Hitachi

JP1 Version 11 JP1/Script Description and Reference (For Windows Systems)


9.5.7 ServicePause (halt a service)

Purpose

Temporarily halts an active service.

Syntax
ServicePause(ServiceInfoName)
Argument
ServiceInfoName

Specify the service information name of the service to be halted. Write a character string or a variable that stores this value.

Description

The ServicePause command temporarily halts an active service, using the value stored in the keyword Name in the service information.

This command internally executes the ServiceControl command.

The execution result is stored in the _SVC_RTN_ reserved variable. The command returns True on successful execution, or False for all other states.

Note

Execute the script file as a user who has administrator permissions. For details, see 1.8.2 Command behavior.

Example
' Halt the active JP1/Script service.
Dim svStatus
ServiceSetValue("JSService", Name::"JP1_Script")
ServiceRefer("JSService", svStatus)
If  svStatus = SERVICE_RUNNING  Then
  ServicePause("JSService")
End
JP1/Script version

Supported from JP1/Script 01-00.