Utility - exportNSHScriptRun


Utility - exportNSHScriptRun

Description :

This command exports the results (job run log) of a NSH Script Job run to a file. You must identify the job run by its run ID.

Return type : java.lang.Void

Command Input :

Variable Name

Variable Type

Description

runId

Integer

ID of the NSH Script Job run whose results you want to export.

exportFileName

String

Name of the file that holds the export.

Example

The following example shows how to export the job run result of a NSH Script Job.

Script

$JOB_KEY=`blcli NSHScriptJob getDBKeyByGroupAndName "/sampleJobGroup" "sampleJob"`
 
$RUN_KEY=`blcli JobRun findLastRunKeyByJobKey $JOB_KEY`

$JOB_RUN_ID=`blcli JobRun jobRunKeyToJobRunId $RUN_KEY`

blcli Utility exportNSHScriptRun $JOB_RUN_ID "C:/temp/sampleJobResult.csv"

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*