Template - setInstallAndUninstallBatchJob
Template - setInstallAndUninstallBatchJob
Description :
This command sets both the install and uninstall Batch Jobs for the chosen template. If the template has no install or uninstall Batch Job, this sets it. If the template has jobs set already, this replaces them.
Return type : DBKey
Command Input :
Variable Name | Variable Type | Description |
---|---|---|
templateGroupName | String | Fully qualified template group name. |
templateName | String | Name of the template. |
installBatchJobKey | DBKey | DBKey of the install Batch Job. |
unInstallBatchJobKey | DBKey | DBKey of the uninstall Batch Job. |
Example
The following example sets the install and uninstall jobs of a template at the same time.
Script
# Name of the existing install Batch Job.
INSTALL_BATCHJOB_NAME="batchjob1"
# Job group in which the install Batch Job is stored.
INSTALL_BATCHJOB_GROUP="/parent/group1"
# Get the install Batch Job DBKey using the above information.
INSTALL_BATCHJOB_DBKEY=`blcli BatchJob getDBKeyByGroupAndName $INSTALL_BATCHJOB_GROUP $INSTALL_BATCHJOB_NAME`
# Name of the existing uninstall Batch Job.
UNINSTALL_BATCHJOB_NAME="batchjob2"
# Job group in which the uninstall Batch Job is stored.
UNINSTALL_BATCHJOB_GROUP="/parent/group2"
# Get the uninstall Batch Job DBKey using the above information.
UNINSTALL_BATCHJOB_DBKEY=`blcli BatchJob getDBKeyByGroupAndName $UNINSTALL_BATCHJOB_GROUP $UNINSTALL_BATCHJOB_NAME`
# Set the install and uninstall Batch Jobs on the template
blcli Template setInstallAndUninstallBatchJob /TemplateGroupName TestTemplate $INSTALL_BATCHJOB_DBKEY $UNINSTALL_BATCHJOB_DBKEY
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*