BatchJob - removeMemberJobByJobKeyAndIndex

BatchJob - removeMemberJobByJobKeyAndIndex

Description :

This command removes a member job by handle to an existing Batch Job. The desired member job to remove is selected via the job index.

The jobKey argument identifies the Batch Job to be modified. The index argument indicates which member job to remove. This is a 0 indexed list with the top most job being index 0. Successful editing of a Batch Job requires that the order of insertion is known. 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.

index

Integer

Index to member job to be deleted.

Example

The following example shows you how to remove a member job from 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` 

# Index of the job. 

JOB_INDEX=1 

#Now remove the job from the Batch Job. 

BATCHJOB_DBKEY=`blcli BatchJob removeMemberJobByJobKeyAndIndex $BATCHJOB_DBKEY $JOB_INDEX` 

# Use the returned DBKey to remove more jobs from the Batch Job. 



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

Comments