|
Description
RunTask() is used to run a specified executable.
Call Signature
int RunTask ( string task_name, string arg_string, string run_options [, function exit_function] )
Return Value
int
The process id of the task is returned or -1 if it fails to run the task. However if the run_options includes "WAIT". then it returns -1 if it fails and 1 if it succeeds.
Arguments
string task_name:
The name of the executable to run.
string arg_string:
Command-line arguments to be passed to the task.
string run_options:
Any combination of "WAIT", "SUBSHELL", SYSERROR", "QUIET" or "OWNTERM". If multiple values are passed, they must be separated by a vertical bar character "|".
[ function exit_function ]:
If the function is not running in "WAIT" mode, then the specified function will be called when the given task completes. The execution of other functions may be temporarily interrupted while the exit_function() is executed. The exit_function is an optional argument.
Remarks
Command-line arguments can be passed, and the executable may be run in the background.
See also
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.