SetSchedulerResult SetScheduler(SchedulerId tScheduler, SetSchedulerArg tArg)
tScheduler. Scheduled tasks container instance moniker.
tArg. Parameters for changing container metadata.
The SetScheduler operation changes metadata of a scheduled tasks container.
This operation enables the user to execute the following operations:
Change tasks parameters.
Change the list of tasks (delete the existing tasks and create new ones).
Start selected tasks and get results of their execution.
On the server start the task scheduler that will execute the tasks according to execution period parameters.
To execute the task, in the tScheduler parameter specify the scheduled tasks container instance moniker, and in the tArg parameter specify parameters of change. The moniker can be obtained on executing the OpenScheduler operation. In the tArg.pattern field specify the pattern that will be sued to make changes, and in the tArg.meta field specify the updated tasks metadata. All the changes will be saved automatically.
To start tasks, set the tArg.pattern.execTasks field to true. To start the scheduler, specify the appState.running fields in the pattern and updated metadata. If the tArg.refresh field is defined, scheduler settings are updated on operation execution.
The operation results in the updated tasks metadata if the tArg.metaGet field was defined. The execResults field also shows the results of tasks execution if any tasks have been started. If the task scheduler is refreshed, the results of the refresh are available in the refreshState field.
Various methods of using the operation are given in the following examples:
Example name |
See also: