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.

FileDeployJob - executeJobAndWaitWithApproval

FileDeployJob - executeJobAndWaitWithApproval

Description :

This command executes a File Deploy Job and waits for the job to end before returning. Job execution does not start until an approval is received.

Use this command to execute a job on approval unless the job should be scheduled. Because this command does not return until the job completes, it effectively pauses execution of any script running this command. This command returns a handle to the job run. It can be used in other commands that need to reference the File Deploy Job run.

Return type : com.bladelogic.om.infra.app.service.job.JobRunKey

Command Input :

Variable Name

Variable Type

Description

jobKey

DBKey

Handle to the File Deploy Job to be executed.

approvalId

Integer

Approval ID created using the Job namespace.

Example

The following example shows how to execute a File Deploy Job.

Script


# Name of the existing File Deploy Job. 

FILEDEPLOYJOB_NAME="filedeployjob1" 

# Job group in which the File Deploy Job is stored. 

FILEDEPLOYJOB_GROUP="/parent/group1" 

# Get the File Deploy Job DBKey using the above information. 

FILEDEPLOYJOB_DBKEY=`blcli FileDeployJob getDBKeyByGroupAndName $FILEDEPLOYJOB_GROUP $FILEDEPLOYJOB_NAME` 

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

# Execute the job with approval. 

FILEDEPLOYJOB_RUN_KEY=`blcli FileDeployJob executeJobAndWaitWithApproval  $FILEDEPLOYJOB_DBKEY $FILEDEPLOYJOB_APPROVAL_ID` 



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

Comments