FileDeployJob - executeJobAndWait

FileDeployJob - executeJobAndWait

Description :

This command executes a File Deploy Job and waits for the job to end before returning. If approval is enabled for the job type use the other command which takes in approval id as an additional input.

Use this command to execute a job 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.

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` 

# Execute the job. 

FILEDEPLOYJOB_RUN_KEY=`blcli FileDeployJob executeJobAndWait  $FILEDEPLOYJOB_DBKEY` 



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

Comments