CloseScheduler

Syntax

bool CloseScheduler(SchedulerId tScheduler)

Parameters

tScheduler. Moniker of the scheduled tasks container instance to be closed.

Description

The CloseScheduler operation closes the scheduled tasks container.

Comments

To execute the operation, in the tScheduler field specify moniker of the scheduled tasks container instance to be closed. The operation results in the logical True if the object was closed successfully.

Example

Below is the example of closing the instance of scheduled tasks container instance. The request contains a container moniker. The response contains whether closing was successful.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<CloseScheduler xmlns="http://www.fsight.ru/PP.SOM.Som">
<tScheduler xmlns="">
  <id>S1!M!6445</id>
  </tScheduler>
  </CloseScheduler>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
  <CloseSchedulerResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">1</CloseSchedulerResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"CloseScheduler" :
{
"tScheduler" :
{
"id" : "S1!M!6445"
}
}
}

JSON response:

{
"CloseSchedulerResult" : "1"
}
public static bool CloseTasksContainern(SchedulerId moniker)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tClose = new CloseScheduler()
{
tScheduler = moniker
};
//Close scheduled tasks container instance
var b = somClient.CloseScheduler(tClose);
return b;
}

See also:

Working with Modeling Container