Unsupported content

 

This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

Job - addOneTimeScheduleWithApproval

Job - addOneTimeScheduleWithApproval

Description :

This command adds a one-time schedule to a job. The job 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 jobKey is a handle to the job being modified. To find the jobKey for a specific job type, use the SnapshotJob getDBKeyByGroupAndName command.

The dateString argument defines a one-time schedule to be added to the job definition. It must be in the format YYYY-MM-DD HH:MM:SS.

This command does not send a job notification. To add a schedule that includes notifications, see the Job addOneTimeScheduleWithSNMPNotificationAndWithApproval or Job addOneTimeScheduleWithEMailNotificationAndWithApproval commands.

Return type : java.lang.Object

Command Input :

Variable Name

Variable Type

Description

jobKey

com.bladelogic.om.infra.model.base.keys.SJobKey

Handle to the job.

dateString

String

One-time schedule to be added. The date string must be in the format YYYY-MM-DD HH:MM:SS.

approvalId

Integer

Approval ID to be attached to the job.

Example

The following example shows how to add a schedule to a job for a single run on the 1st of January 2005 at 11:35 PM.

Script

DATE_STRING="2005-01-01 23:35:00" 

JOB_KEY=`blcli SnapshotJob getDBKeyByGroupAndName /snapshots snapconfig` 

JOB_APPROVAL_ID=`blcli Job createApproval 2 2 "My change" 2 3 "" ""` 

JOB_KEY=`blcli Job addOneTimeScheduleWithApproval $JOB_KEY "$DATE_STRING" $JOB_APPROVAL_ID` 

Was this page helpful? Yes No Submitting... Thank you

Comments