JobRun- getJobRunIdByScheduleId

JobRun - getJobRunIdByScheduleId

Description :

This command returns the Job Run ID for a given Schedule Id. Job such as a Batch Job or Patching Job will return multiple job run IDs for a single Schedule ID.

Return type : String

Command Input :

Variable Name

Variable Type

Description

scheduleId

Integer

Schedule ID of the Job Run

Example

The following example shows how to get the Job Run ID for a scheduled job.

Script

JOB_FOLDER="/DeployJobs" 
JOB_NAME="Deploy to all Servers" 
JOB_KEY=`blcli DeployJob getDBKeyByGroupAndName "$JOB_FOLDER" "$JOB_NAME"` 
JOB_SCHEDULE_ID=`blcli JobRun executeJobAndReturnScheduleID "$JOB_KEY"`
JOB_RUN_ID=`blcli JobRun getJobRunIdByScheduleId "$JOB_SCEDULE_ID"`
Was this page helpful? Yes No Submitting... Thank you

Comments