BatchJob - addMemberJobByJobKey

BatchJob - addMemberJobByJobKey

Description :

This command adds a member job by handle to an existing Batch Job. The member job is placed at the end of the list of member jobs.

The jobKey argument identifies the Batch Job to be modified. The memberKey argument provides the handle for the member job being added to the Batch Job. This command returns a handle to the updated job. Note that this handle is different than any previous handle to this job. All older handles are invalid.

Return type : DBKey

Command Input :

Variable Name

Variable Type

Description

jobKey

DBKey

Handle to the Batch Job.

memberKey

DBKey

Handle to the member job to be added.

Example

The following example shows you how to add a Snapshot Job to an existing Batch Job.

Script


# Name of the existing Batch Job. 

BATCHJOB_NAME="batchjob1" 

# Job group in which the Batch Job is stored. 

BATCHJOB_GROUP="/parent/group1" 

# Get the Batch Job DBKey using the above information. 

BATCHJOB_DBKEY=`blcli BatchJob getDBKeyByGroupAndName $BATCHJOB_GROUP $BATCHJOB_NAME` 

# Name of the existing Snapshot Job. 

JOB_NAME="job1" 

# Job group in which the Snapshot Job is stored. 

JOB_GROUP="/parent/group1" 

# Get the Snapshot Job DBKey using the above information. 

JOB_DBKEY=`blcli SnapshotJob getDBKeyByGroupAndName $JOB_GROUP $JOB_NAME` 

#Now add the Snapshot Job to the Batch Job. 

BATCHJOB_DBKEY=`blcli BatchJob addMemberJobByJobKey $BATCHJOB_DBKEY $JOB_DBKEY` 

# Use the returned DBKey to add more jobs to the Batch Job. 



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

Comments