AgentInstallerJob - executeJobAndWaitWithApproval


AgentInstallerJob - executeJobAndWaitWithApproval

Description :

This command executes an Agent Installer Job and waits for the job to end before returning.The execution of the job starts only after the approval is received.

Use this command to execute a job immediately after 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 also pauses the execution until the approval is received, so if it is used with Manual Approval, it will wait until the approval is received. This command returns a handle to the job run, which can be used in other commands that need to reference the Agent Installer Job run.

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

Command Input :

Variable Name

Variable Type

Description

jobKey

DBKey

A handle to the Agent Installer Job to be executed.

approvalId

Integer

Approval ID created using the Job namespace.

Example

The following example shows how to execute an Agent Installer Job with approval.

Script





JOB_NAME=agentInstallerJob

JOB_GROUP=/installjobs

JOB_DBKEY=`blcli AgentInstallerJob getDBKeyByGroupAndName $JOB_GROUP $JOB_NAME`

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

JOB_RUN_KEY=`blcli AgentInstallerJob executeJobAndWaitWithApproval $JOB_DBKEY $JOB_APPROVAL_ID`



 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC Server Automation Command Line Interface 8.7