Siebel Analytics Scheduler Guide > Configuring Siebel Analytics Scheduler Job Scripts > Analytics Scheduler Script Object Methods and Events >

RegisterCancelCommand Method


Registers a method to be called when the script is canceled.

Usage: Occasionally, an object's method takes a long time to complete. If the job is canceled before the call returns, the script engine still must wait until the call returns. This could potentially take hours and limit resources. This method solves the problem by registering a method that is asynchronously called by the script engine if the script gets canceled.

Cancel methods should be registered before calling the method that executes a long operation. When the method returns, the cancel method should be deregistered by calling DeregisterCancelCommand().

A good practice is to hide implementation details of a COM object from the caller, having the COM object itself handle all registration and deregistration of cancel commands. Pass an instance of the Script object to the COM object, then call the RegisterCancelCommand() and DeregisterCancelCommand() methods because the Script object implements the IDispatch interface.

Syntax: RegisterCancelCommand source, methodName [, arguments]...

Arguments: See Table 27 for RegisterCancelCommand method arguments.

Table 27. RegisterCancelCommand Method Arguments
Argument
Description

source

An object whose method is being registered.

methodName

A string that specifies the method name.

arguments

Optional arguments to be passed into the method.

Siebel Analytics Scheduler Guide