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 gets 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 operation results in the requested metadata.
Below is the example of getting general and specific settings of the tasks located in the scheduled tasks container. The request contains the moniker of opened task container instance and the pattern that specifies whether task settings should be obtained. The response contains the obtained information.
{
"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" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "0",
"@hf" : "0",
"i" : "TASKS_CONTAINTER",
"n" : "Scheduled tasks container",
"k" : "6445",
"c" : "5378",
"p" : "6444",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0",
"isPermanent" : "1",
"isTemp" : "0"
}
},
"tasks" :
{
"its" :
{
"it" :
[
{
"k" : "6449",
"id" : "RUN_MODULE",
"n" : "Unit execution",
"vis" : "1",
"type" : "ExecuteSub",
"ds" : "",
"properties" :
{
"period" :
{
"type" : "Daily",
"startDateTime" : "1999-12-31T23:00:00.000",
"stopDateTime" : "2009-12-31T23:00:00.000",
"everyDays" : "1"
},
"active" : "0",
"queueing" : "0",
"userTag" : "ADMIN",
"threadClass" : "1",
"publishing" :
{
"SendMail" : "0",
"mailAddress" : "",
"mailSubject" : "&[TASK_RESULT] - &[TASK_FINISH] : &[TASK_NAME]",
"mailBody" : "&[TASK_RESULT] - &[TASK_FINISH] : &[TASK_NAME]",
"ftpAddress" : "",
"appendAttachment" : "1",
"dynamicMailListMacro" : "",
"dynamicMailListModule" : "",
"UseDynamicMailList" : "0"
},
"paramValues" : "",
"eventId" : ""
},
"settings" :
{
"fore" :
{
"obDesc" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "0",
"@hf" : "0",
"i" : "TASK_MODULE",
"n" : "Unit",
"k" : "6447",
"c" : "1537",
"p" : "6444",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0"
},
"subName" : "Run"
}
}
}
]
}
}
}
}
}
public static GetSchedulerResult GetTasksContainernMd(SchedulerId moniker)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
//Operation execution parameters
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: