exec_script

Purpose:

Execute a script file that will return either a 0, which means a ‘pass’ condition or a -1 value which means a ‘fail’ condition. This task must be spawned via the gp_test @AUXILIARY_TASK keyword.

Enter:

exec_script <prio> <strt_evnt> <stp_evnt> <reply_evnt> <proc_num> <mode_num> <call_procspe_filename> <script_file> [arg1] [arg2]

Where:

prio

Specify the task priority.

strt_evnt

Specify the start event name.

stp_evnt

Specify the stop event name.

reply_evnt

Specify the reply event name.

proc_num

Specify the procedure number the task was called from. (not used)

mode_num

The mode number the task was called from. (not used)

call_procspe_filename

Specify the procedure name that called the task (not used)

script_file

Specify the script to execute.

arg1

Optional. An argument needed by ‘script_file’.

arg1

Optional. An argument needed by ‘script_file’.

Example:

The following is an example specification that should be placed in a gp_test procedure. If ‘my_script’ exits with an ‘exit 0’, then the ‘success_path’ would be the next mode executed in the the gp_test procedure. However, if ‘my_script exits with an ‘exit 7’, then the ‘failure_path’ would be the next mode executed by the procedure.

@AUXILIARY_TASK
#start_type                    success_path                   failure_path
AT_START                    MODE_TERMINATE    99

#task pathname                                “command line”
/cyflex/bin/exec_script                 “/specs/cmds/my_script    READ    count”

Notes:

 

See Also:

gp_test, @AUXILIARY_TASK