Руководство Разработчика для Cisco Cisco Workload Automation 6.3

Скачать
Страница из 64
10
Introduction
Scripts and Batch Files
Job aliases must be between one and eight characters in length. Do not use spaces in job aliases.
Note: 
You can use the listrule command to discover the job alias, as well as other job rule data, for your jobs and job 
groups.
Scripts and Batch Files
The sacmd.cmd (Windows) or sacmd.sh (Unix/Linux) program includes the
 
file command that reads commands from 
a file, letting you batch-process a group of commands. 
You can add comments to your file by preceding the comment with two forward slashes 
(//) or the sharp sign (#). You can use spaces or tabs in front of the comment character 
(// or #), but otherwise it must be the first character in a line.
Lines that contain only spaces or tabs are ignored. You can add clarity to your script or batch file by using blank lines to 
separate different sections of your file.
Running the Command Line from CWA
The 
Command
 file can be defined in a job definition along with any necessary command parameters. Commands can 
be run from CWA as jobs if the user: 
is a valid CWA user. (A valid CWA user can login to the CWA Web client. A user who is only a runtime user is not a 
valid CWA user.) 
either uses Windows passwords.
-or- 
runs the agent as a user.
has the CWA access right to a particular command.
Command files are defined from the 
Program
 tab of the 
Job Definition
 dialog. The command is entered in the 
Command
 field and any parameters for the command are entered in the 
Parameters
 field.
Information for accessing the DSP should precede the command line command in the 
Command Parameters
 field.
Command Modes
There are two modes for entering commands from the command line program, Single and Multiple Command.
Note: 
Before using sacmd <command>, you can set -persist to save the given URL, user and password in an encrypted 
file in the user's home directory, so that next time sacmd is started, the URL, user and password will not have to be 
specified. For further information on command arguments, refer to the help by running sacmd -help from the bin directory 
of the Command Line Program home.
Single Command Mode
Using this mode, type 
SACmd before each command. After entering the command, you return to the MS-DOS prompt.
To enter a single command:
1.
Open a command prompt window by selecting 
Start>Programs>Accessories>Command Prompt
.
2.
Change directories by entering the following text (if you used the default location for files during installation) after 
the prompt: