ExecutionTask - addOneTimeScheduleWithApproval
This command adds a one-time schedule to an execution task. The execution task waits until the approval is received and then runs. If the approval does not come on time, the schedule is marked as expired and the approval system closes the change ticket.
The argument etKey is a handle to the execution task being modified. To find the etKey, use the ExecutionTask getDBKeyByGroupAndName command.
The dateString argument defines a one-time schedule to be added to the execution task definition. It must be in the format YYYY-MM-DD HH:MM:SS.
Return type : java.lang.Object
Command Input :
Handle to the execution task.
One-time schedule to be added. The date string must be in the format YYYY-MM-DD HH:MM:SS.
Approval ID to be attached to the job.
The following example shows how to add a schedule to an execution task for a single run on the 1st of January 2005 at 11:35 PM.
DATE_STRING="2005-01-01 23:35:00" ET_KEY=`blcli ExecutionTask getDBKeyByGroupAndName /tasks tstEt` ET_APPROVAL_ID=`blcli Job createApproval 2 2 "My change" 2 3 "" ""` ET_KEY=`blcli ExecutionTask addOneTimeScheduleWithApproval $ET_KEY "$DATE_STRING" $ET_APPROVAL_ID`