Command Usage: samgridBatchAdmin v8_1_5
samgridBatchAdmin add command result

Just having some fun...
Command Description:

Add a possible outcome of a command from the given batch adapter in 
the station configuration. Command outcomes are defined by their 
exit type, output string and optional outcomde description.
The output string may contain one or more predefined templates:

  ['%__USER_PROJECT__', '%__USER_SCRIPT__', '%__USER_SCRIPT_ARGS__', '%__USER_JDF__', '%__USER_JOB_OUTPUT__', '%__USER_JOB_ERROR__', '%__USER_JOB_OUTPUT_DIR__', '%__USER_JOB_OUTPUT_FILE__', '%__USER_JOB_ERROR_FILE__', '%__USER_NUMBER_OF_JOBS__', '%__USER_NAME__', '%__USER_APPLICATION_TYPE__', '%__USER_PREEMPTION__', '%__BATCH_JOB_ID__', '%__BATCH_JOB_STATUS__', '%__BATCH_JOB_NAME__', '%__BATCH_QUEUE__', '%__BATCH_FLAGS__', '%__BATCH_HOST__', '%__UNIX_PROCESS_ID__', '%__UNIX_HOST__', '%__OTHER_STRING__'] 

For example, one might add the following result for the job submission
command in the xyz's station pbs adapter:

  samgridBatchAdmin add command result
    --command-type='job submission command'
    --command-output='%__BATCH_JOB_ID__.%__BATCH_HOST__' 
    --exit-status='0'
    --description='Successful job submission'
    --adapter='pbs'
    --station='xyz'

For more examples, as well as for a full description of available 
templates, please see the SAM Batch Adapter documentation.


Usage:
       samgridBatchAdmin add command result <--requiredOptions> [--options] [-flags]

Where:

  --requiredOptions:
	             --adapter=<value> # batch adapter name
	       --commandOutput=<value> # command output string
	         --commandType=<value> # command type string
	          --exitStatus=<value> # command exit status
	             --station=<value> # station name

  --options:
	         --description=<value> # description string

   -flags:
	                            -d # debug flag
	                            -v # verbose flag

Synonymous Options:
	      --command-output=<value> # synonym for --commandOutput=<value>
	        --command-type=<value> # synonym for --commandType=<value>
	         --exit-status=<value> # synonym for --exitStatus=<value>

Required Data Types:
	                       adapter : string 
	                 commandOutput : string 
	                   commandType : string 
	                   description : string 
	                    exitStatus : int 
	                       station : string 

You may omit "--station=<value>" if the $SAM_STATION environmental variable is set.

UNIX ExitStatus:
	             Success :   0
	Unhandled exceptions : 127


See Also: