HCL Workload Automation, Version 9.4

at and batch

Submit ad hoc commands and jobs to be launched by HCL Workload Automation.

These command runs on UNIX only.

See at.allow and at.deny below for information about the availability to users.

Syntax

at -V | -U

at {-s jstream | -q queue} time-spec

batch -V | -U

batch [-s jstream]

Arguments

-V
Displays the command version and exits.
-U
Displays command usage information and exits.
-s jstream

Specifies the jobstream_id of the job stream instance into which the job is submitted. If a job stream instance with that jobstream_id does not exist, it is created a new job stream having jstream both as alias and as jobstream_id. The name must start with a letter, and can contain alphanumeric characters and dashes. It can contain up to 16 characters.

If the -s and -q arguments are omitted, a job stream name is selected based on the value of the environment variable ATSCRIPT. If ATSCRIPT contains the word maestro, the job stream alias will be the first eight characters of the user's group name. If ATSCRIPT is not set, or is set to a value other than maestro, the job stream alias will be at (for jobs submitted with at), or batch (for jobs submitted with batch).

See Other considerations for more information about job streams.

The following keywords apply only to at jobs:
-qqueue
Specifies to submit the job into a job stream with the name queue, which can be a single letter (a through z). See Other considerations for more information about job streams.
time-spec
Specifies the time at which the job will be launched. The syntax is the same as that used with the UNIX at command.

Comments

After entering at or batch, enter the commands that constitute the job. End each line of input by pressing the Return key. The entire sequence is ended with end-of-file (usually Control+d), or by entering a line with a period (.). Alternatively, use an angle bracket (<) to read commands from a file. See Examples.

Information about at and batch jobs is sent to the master domain manager, where the jobs are added to job streams in the production plan, Symphony file. The jobs are launched based on the dependencies included in the job streams.

The UNIX shell used for jobs submitted with the at and batch commands is determined by the SHELL_TYPE variable in the jobmanrc configuration script. Do not use the C shell. For more information, see Customizing job processing on a UNIX workstation - jobmanrc.

Once submitted, jobs are launched in the same way as other scheduled jobs. Each job runs in the submitting user's environment. To ensure that the environment is complete, set commands are inserted into the script to match the variable settings in the user's environment.

Examples

To submit a job into job stream with jobstream_id sched8 to be launched as soon as possible, run the following command:

batch -s sched8
command <Return>
...
<Control d>

To submit a job to be launched two hours from the time when the command was entered, run the following command:

at now + 2 hours
command <Return>
...
<Control d>

If the variable ATSCRIPT is null, the job is submitted into a job stream having the same name as the user's group. Otherwise, it is submitted into a job stream named at.

To submit a job into a job stream instance with jobstream_id sked-mis to be launched at 5:30 p.m., run the following command:

at -s sked-mis 17h30
command <Return>
...
<Control d>

The following command is the same as the previous command, except that the job's commands are read from a file:

at -s sked-mis 17h30 < ./myjob

The fact that the commands are read from a file does not change the way they are processed. That is, the commands are copied from the ./myjob file into a script file.