NSHScriptJob - createNSHScriptJob_1

NSHScriptJob - createNSHScriptJob

Description :

This command creates an NSH Script Job that runs against multiple targets. You must provide fully qualified paths to the job group where the job is stored and the depot group where the script being run is stored (for example, /NSHScriptJobs/Utility/ and /NSHScripts/UtilityScripts, respectively). The numParProc argument sets how many targets a job can run against simultaneously. Use the addTargetServer or addTargetGroup commands in the Job name space to add more targets to the NSH Script Job.

Return type : DBKey

Command Input :

Variable Name

Variable Type

Description

jobGroup

String

Full path to the job group containing the NSH Script Job.

jobName

String

Name of the NSH Script Job.

description

String

Description of the job being added.

scriptGroup

String

Full path to the depot group containing the NSH script to be executed.

scriptName

String

Name of the NSH script to be executed.

targetName

String

Server or server group against which the script will be executed.

numParProc

Integer

Maximum number of parallel executions.

Example

The following examples shows how to create an NSH Script Job with a single target server:

Script

JOB_GROUP=/noc 

JOB_NAME=noc-reboot 

JOB_DESC="reboots the noc" 

NSHSCRIPT_GROUP=/nocscripts 

NSHSCRIPT=reboot 

TARGET_SERVER=noc-kerb-1 

PAR_PROCS=10 

JOB_KEY=`blcli NSHScriptJob createNSHScriptJob $JOB_GROUP $JOB_NAME "${JOB_DESC}" $NSHSCRIPT_GROUP $NSHSCRIPT $TARGET_SERVER $PAR_PROCS` 
Was this page helpful? Yes No Submitting... Thank you

Comments