Command

This feature allows you to run executable programs.  To run shell commands, batch/script files, you will need to launch the appropriate shell as an executable. Then use the shell to run the command.

Command Line
Executables:  to run an executable,  browse to it, or enter it manually. Example:
c:\winnt\notepad.exe
If the path to your executable includes spaces, enter the path to the executable in quotes.  Example:
"c:\program files\myexe.exe"
To enter a commandline parameter to pass to your executable, enter a space between the path and the parameter. Leave spaces between any subsequent parameters.  Example:
"c:\program files\myexe.exe" par1 par2

For Shell commands, and batch or script files: the syntax required vary depending on operating systems.  Examples of batch commands for Win 95/98, WinNT/2000pro, Unix, and Mac OS X are listed at the end of this section. 

This field also supports dynamic variables.  For example, to launch a batch file, and pass it the current time, use:
c:\data\test.bat $%DATE::hh:mm:ss%$

Working Directory
The working directory is required for your program, command or script to run correctly.  This is very important if the program or script uses relative paths to access files.

Environment Variables
This is an array of strings. Each element of this array has environment variable settings in format name=value. You should separate each name=value pair by a delimiter character. You can choose the delimiter to separate each element.  The default delimiter is ^.  If any of your variable name=value pairs contains the ^ character, then you should set another character as your delimiter. The delimiter cannot be "=" or any other character that appears in your name=value pairs.
Example of correctly formatted environment variables on windows systems:
PATH=c:\test;c:\test2;c:\test3^TEMP=c:\temp

This field also supports dynamic variables.  For example, to launch a batch file and set the variable 'CUSTOM_DATE', use:
CUSTOM_DATE=$%DATE::Qqq dd, YY HH:mm:ss am_pm%$
This will set the variable CUSTOM_DATE in the batch file to: Aug 21, 2002 10:21:23 AM  etc..

Termination Time
The termination time is the maximum time that your program or script can run.  The task will terminate your program, if it is still running, after the maximum allowed time.  Enter a value = 0, if you do not want to terminate your program.  In this case, the task will wait indefinitely, for your task to finish.

Polling interval
While your program or script is running, the task continuously polls your program/script. The task will check if the program has completed. The task will obtain the Exit Code value, when your program exits.  You can select the polling interval (default = 15 seconds). The minimum interval is 1 second.  We recommend using 15 seconds.  

Command line Examples

Win 95/98

1) Executable programs:
Command line = c:\windows\notepad.exe
Working Directory = c:\windows

2) Batch files (uses command.com, located usually in c:\windows or in c:\)
Command line = c:\windows\command.com /c c:\test\test.bat
Working Directory = c:\test

NOTE: you can also try and run batch files, just like an executable, depending on your system setup.
Command line = c:\test\test.bat

3) Shell commands (uses command.com, located usually in c:\windows or in c:\)
Command line = c:\windows\command.com /c set c:\test\set.txt
Working Directory = c:\windows
(this example will output all your environment variables to the file set.txt)

WinNT/2000pro

1) Executable programs:
Command line = c:\winnt\notepad.exe
Working Directory = c:\winnt

2) Batch files (uses cmd.exe, located usually in c:\winnt or c:\winnt\system32)
Command line = c:\winnt\system32\cmd.exe /c c:\test\test.bat
Working Directory = c:\test

NOTE: you can also try and run batch files, just like an executable, depending on your system setup.
Command line = c:\test\test.bat

3) Shell commands (uses cmd.exe, located usually in c:\winnt or c:\winnt\system32)
Command line = c:\winnt\system32\cmd.exe /c set c:\test\set.txt
Working Directory = c:\winnt\system32
(this example will output all your environment variables to the file set.txt)
 

Unix (Solaris, Linux, MacosX or other)

To run shell commands or scripts, you will need to launch the appropriate shell as an executable. Then use the shell to run the command.
Example to run the script 'myscript' from the /home/name directory, using the 'sh' command interpreter:
    Commandline = sh myscript
    Working Dir = /home/name

To see the options available to run your script, use man sh, man csh, or man bash.

Another option to run a shell script or command, is to use the Telnet Task.  Using the Telnet task, login to the local system, 'cd' to the desired director, using a first telnet command. Then run the shell script or command, using a second telnet command.

Mac OS X

1.  AppleScripts: Use the 'osascript' command to launch your AppleScripts
    Example:
    Commandline = /usr/bin/osascript  /user/Name/YourScript.scpt
    Working Dir = /user/Name

2.  Launch Applications or files: You can also use the 'open' command in MacOS X, to open a document or application
    Example:
    Command Line = open Stickies.app
    Working Dir = /Applications

3.  Command line:   To run shell commands or scripts, please see the section on Unix above.