GetSchedulerResult GetScheduler(SchedulerId tScheduler, GetSchedulerArg tArg)
tScheduler. Scheduled tasks container instance moniker.
tArg. Parameters of metadata getting.
The GetScheduler operation gets metadata of the scheduled tasks container.
The operation enables the user to get information about tasks created in the container and information about the task scheduler's state. To execute the operation, in the tScheduler parameter specify the opened scheduled tasks container instance moniker, and in the tArg parameter specify getting parameters. The moniker can be obtained on executing the OpenScheduler operation. The result of the operation is the requested metadata.
{ "GetScheduler" : { "tScheduler" : { "id" : "S1!M!6445" }, "tArg" : { "pattern" : {
"obInst" : "true", "all" : "true", "task" : { "properties" : "true", "settings" : "true" } } } } }
{ "GetSchedulerResult" : { "id" : { "id" : "S1!M!6445" }, "meta" : { "obInst" : {
"obDesc" : { "@isShortcut" : "0", "@isLink" : "0", "i" : "TASKS_CONTAINTER", "n" : "Scheduled tasks container", "k" : "6445", "c" : "5378", "p" : "6444", "h" : "0"
} }, "tasks" : { "its" : { "it" : [ { "k" : "6449",
"id" : "RUN_MODULE", "n" : "Module execution", "vis" : "1", "type" : "ExecuteSub", "properties" : { "period" : { "type" : "Daily", "startDateTime" : "2000-01-01T00:00:00.000"
"stopDateTime" : "2010-01-01T00:00:00.000", "everyDays" : "1" }, "active" : "0", "queueing" : "0", "userTag" : "ADMIN", "threadClass" : "1", "publishing" : { "mailAddress" : "",
"mailSubject" : "&[TASK_RESULT] - &[TASK_FINISH] : &[TASK_NAME]", "mailBody" : "&[TASK_RESULT] - &[TASK_FINISH] : &[TASK_NAME]", "ftpAddress" : "", "appendAttachment" : "1" }, "paramValues" : "" }, "settings" : { "fore" :
{ "subName" : "Run" } } } ] } } } } }
The GetTasksContainernMd function specified below gets metadata of scheduled tasks container and tasks created in it. The container moniker is sent as a function input parameter.
public static GetSchedulerResult GetTasksContainernMd(SchedulerId moniker)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
//Operation execution paameters
var tGet = new GetScheduler()
{
tScheduler = moniker,
tArg = new GetSchedulerArg()
{
pattern = new SchedulerMdPattern // Metadata get pattern
{
all = true,
task = new SchedulerTaskPattern()
{
properties = true,
settings = true
}
}
}
};
//Get scheduled tasks container metadata
var tResult = somClient.GetScheduler(tGet);
return tResult;
}
See also:
Working with Modeling Container