ExecutionTask - setScheduleTillCompletionByMaxExecutions
ExecutionTask - setScheduleTillCompletionByMaxExecutions
Description :
This command sets the given schedule to run in "schedule till completion" mode according to the specifed parameters.
Return type : void
Command Input :
Variable Name | Variable Type | Description |
|---|---|---|
scheduleId | Integer | ID of the schedule you want to work with. |
maxNumOfRetries | Integer | Maximum number of retries. |
includeTargetsWithWarnings | Boolean | True to run the schedule against targets with warnings or errors. False to run the schedule only against targets with errors. |
includeNotRunTargets | Boolean | True to include targets in "not run" status. False to exclude targets in "not run" status. |
Example
The following example shows how to set a schedule to run in "schedule till completion" mode. You can retrieve the schedule ID by calling any of the schedule's "create" commands (except addOneTimeSchedule). This example uses one of the available commands - addDailySchedule. This example limits the number of retries to 3 and runs only against targets with errors.
Script
DATE_STRING="2005-01-01 23:35:00"
ET_KEY=`blcli ExecutionTask getDBKeyByGroupAndName /tasks tstET`
SCHEDULE_ID=`blcli ExecutionTask addDailySchedule $ET_KEY $DATE_STRING`
blcli ExecutionTask setScheduleTillCompletionByMaxExecutions $SCHEDULE_ID 3 false false