BatchJob - addNamedServerToJobByJobDBKey
BatchJob - addNamedServerToJobByJobDBKey
Description :
This command adds a server by name to an existing Batch Job.
The jobKey argument identifies the Batch Job to be modified. The serverName argument provides a name for the server being added to the job.
This command performs the same action as Job : addTargetServer . 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. |
serverName | String | Name of the server to be added. |
Example
The following example shows you how to add a server 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 server.
SERVER_NAME="server1"
#Now add the server to the Batch Job.
BATCHJOB_DBKEY=`blcli BatchJob addNamedServerToJobByJobDBKey $BATCHJOB_DBKEY $SERVER_NAME`
# Use the returned DBKey to add more servers to the Batch Job.
Comments
Log in or register to comment.