Cisco Cisco Workload Automation 6.3 User Guide

Page of 412
150
Jobs and Job Groups
Defining Jobs Interface
Program Tab
The Program tab displays in the Job Definition dialog. On this tab you specify the parameters and directories to be used 
as the command designated in the job runs.
This tab contains the following elements:
Command/Parameters – The absolute path and filename of the command, script, batch file or executable that you 
want the job to run, from the perspective of the agent that it runs on. Do not use a mapped drive in the pathname. 
Follow UNC conventions when entering the pathname. Notice that there is a separate field for command parameters 
that is below the Command field. Do not add parameters to your command in the Command field.
Note: You can view and edit the contents of command files by right-clicking the file from the Select Program dialog, 
then selecting Edit from the context menu.
You should specify the full path to the file you want to run. The format is \\<computer name>\<folder name>\<file 
name>
 or <drive>:\<folder name>\<file name>. You will only need the computer name if the job is running on a 
different computer from the CWA Web Client. To insert a variable into your path specification, click Variables and 
then select the variable you want to use. 
Another way to specify this command would be to define a variable called 
paydir whose value is the Payroll 
Executables directory. Then, you could specify your command line like this: 
<paydir>\payrolldat.exe. If the 
location of the payroll executables ever changes, you would need only to update the definition of the 
paydir variable 
for all the jobs using the 
paydir variable (rather than the literal location of the directory) to be updated.
CWA runs any command that is an executable such as files with the extensions .exe.bat and .cmd or script files on 
the Unix platform.
Command Parameters – Command parameters supply essential information that the command requires to run, and 
are passed to it when it is executed. Command parameters are appended to the command exactly as entered. This 
field will accept up to 1,024 characters.
Command parameters allow a single command file to be used for multiple purposes. For example, a command that 
processes data from a certain file could be given the file’s name as a command parameter. You can type all your 
parameters on a single line. CWA will wrap the text display so that it is easier to read. 
CWA uses the standard MS-DOS command syntax for command parameters. The command parameters
 are 
substituted into a command file containing the variable names %1
, %2, etc. When the command is issued, command 
parameters are passed exactly as you specify them. You should separate each parameter value with a space so that 
the first value replaces %1, the second value replaces %2 when the batch file is executed.
Note: Any argument that either explicitly has a space in it or could have a space in the argument should be enclosed 
in quotation marks; otherwise, the argument is returned as separate arguments wherever the spaces occur. For 
example, a job called Section 59 Tally would be returned as separate arguments, “Section,” “59” and “Tally.” 
Similarly, if a variable like <jobname> could return an argument containing a space, it also should be enclosed in 
quotation marks
.
The following batch file is an example of how Windows accepts and handles command parameters. Listed below 
are the contents of the Argdemo batch file, found in the CWA Agent Tutorial directory.
@ECHO OFF
title ArgDemo.bat
ECHO This job will run the sleep program for 60 seconds
ECHO then echo back the first three job parameters
%Tidal%\agent\tutorial\SLEEP.EXE 60
echo Program Parameter 1 = %1
echo Program Parameter 2 = %2
echo Program Parameter 3 = %3
ECHO done
ocsexit 0