You can define a UNIX job to schedule workload to run on a UNIX computer. The job can run a script or execute a command.
Note: To run these jobs, your system requires CA WA Agent for UNIX or Linux.
Follow these steps:
The Application appears in the workspace.
The UNIX icon appears on the Application workspace view.
The Basic page of the UNIX dialog opens.
Defines the name of the job that you want to schedule.
Limits: 128 alphanumeric characters, plus the special characters commercial at (@), pound (#), dollar sign ($), underscore (_), square brackets ([]), brace brackets ({}), and percent sign (%) as a symbolic variable introducer character.
Specifies the name of the agent installed on the UNIX computer or the name of the agent group where the job runs. You can use agent groups for load balancing or to run a job on all agents in a group.
Note: The drop-down list displays all the agents that are defined in the Topology for the specified job type.
Indicates whether the job runs a script or executes a command.
Note: You can also browse for the script or command name using the Script/Command Browser, enter the script or command name without the full path, or enter the script or command name using an environment variable.
Defines the argument string of positional parameters to pass to a script. Arguments can be numeric or alphabetic strings of data.
Note: You must specify each parameter in the order it is expected in the script, separating each parameter with a blank space. To pass a parameter containing spaces, enclose it in double quotes.
Examples: p1 p2 p3, 362 "629 630" 748
Specifies the UNIX user ID that has the authority to run the job on the agent computer. You must specify a user ID if the job runs a command. This field supports the use of a namespace for a user that has more than one password. Contact your administrator for the user name defined in the Topology.
Default: Owner of the script or command (if the agent runs under the root account)
Examples: Bob, Production:Bob
Notes:
Indicates the shell name used to execute the script or command file. The default for most agents is the Korn shell (/bin/ksh). However, you can choose one of the following shells:
The UNIX job is defined.
Example: Run a Script that is Located in a Path Set in the PATH Environment Variable
Suppose that the job PROCSCRIPT runs a script named procscript.sh. The job runs under the user ID jsmith, who has the authority to run the script. The path to procscript.sh is set in the PATH system environment variable for jsmith. This job runs on the default agent computer.
To run a script that is located in a path set in the PATH environment variable
Example: Run a Script that is Located in a Path Set in a User Environment Variable
Suppose that the job MYSCRIPTJOB runs a script named myscript.sh. The job runs under the user ID jsmith, who has the authority to run the script. The path to myscript.sh is set in the user environment variable $MY_PATH, which is defined in the profile file for jsmith. This job runs on the default agent computer.
To run a script that is located in a path set in a user environment variable
Example: Run a Different Script Depending on the Agent
Suppose that a job runs a payroll script (/export/home/cybuser/payroll.sh) on the UNIX1 agent. Sometimes, the job runs under a different agent. In this case, the job needs to run another script (export/home/cybuser/other_script.sh).
The %IF statement for the job's Script/command name field is as follows:
%IF(WOB._Agent=='UNIX1','/export/home/cybuser/payroll.sh','/export/home/cybuser/other_script.sh')
The WOB._Agent symbolic variable represents the agent that the job runs on.
Note: For more information about JavaScript expressions and built-in functions, see the Programming Guide.
Example: Run a PERL Script
Suppose that you want to schedule a PERL script located at /home/espuser/esptest/esptest.pl, and the PERL executable is located at /usr/contrib/bin/perl. The job PERLJOB runs under the user jsmith, who has access to the PERL executable and the authority to run the PERL script. This job runs on the default agent computer.
To run a PERL script
|
Copyright © 2014 CA Technologies.
All rights reserved.
|
|