Job - addTargetServers
Job - addTargetServers
Description :
This command adds multiple target servers to a job.
The argument jobKey is a handle to the job you are modifying. This command returns a handle to the updated job.
Return type : DBKey
Command Input :
Variable Name | Variable Type | Description |
|---|---|---|
jobKey | DBKey | Handle to the job you want to update. |
serverNames | com.bladelogic.om.infra.cli.helper.StringList | List of the target server names. |
Example
The following example shows how to add servers named engrhas21agt1 and engrhas21agt2 to a Snapshot Job called tstSnap in the job group /snapshots.
Script
JOB_KEY=`blcli SnapshotJob getDBKeyByGroupAndName /snapshots tstSnap`
JOB_KEY=`blcli Job addTargetServers $JOB_KEY engrhas21agt1,engrhas21agt2`
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*