4.3BSD-UWisc/man/catl/batch.l
BATCH(LOCAL) UNIX Programmer's Manual BATCH(LOCAL)
NAME
batch, pbq, rmbq - execute commands in a batch queue
SYNOPSIS
batch [ options ] command
pbq
rmbq [ job numbers ] [ -u login ]
DESCRIPTION
_B_a_t_c_h queues the command to be executed in order to reduce
the system load average. Jobs are executed in first come
first serve order. Batched jobs are given priority over
normal background jobs, so it is to your advantage to use
it. Note that any I/O redirection in the batch command line
will only redirect output from the _b_a_t_c_h command. Commands
may have an arbitrary number of arguments.
_B_a_t_c_h _o_p_t_i_o_n_s
-i file
Redirect _f_i_l_e as the standard input to the command
-o file
Redirect the standard output of the command to _f_i_l_e
-e file
Redirect the standard error output of the command to
_f_i_l_e
-O file
Redirect both standard output and standard error to
_f_i_l_e
-n nice
Set priority to _n_i_c_e instead of the default.
-t Truncate output files.
-a Append to output files.
-f Notify when the command has completed.
-s Notify when the command has started.
-M Any notifications made are via the _m_a_i_l(1) command.
-W Any notifications made are via the _w_r_i_t_e(1) command.
The environment variable _B_A_T_C_H can be used to set
Printed 1/10/87 uw 1
BATCH(LOCAL) UNIX Programmer's Manual BATCH(LOCAL)
default batch options.
Example: setenv BATCH '-sfo OUT -e ERR'
will notify upon start and finish of any batch jobs,
redirect standard output to the file OUT, and redirect
error output to the file ERR.
_P_b_q gives the current status of the batch queue. The first
line shows the current number of high priority jobs
running, the maximum number of concurrent high priority
jobs, and the number of low priority jobs running.
Batch will attempt to keep the maximum number of high
priority jobs going simultaneously. For each job it
lists its rank, owner, job number, time, and the com-
mand name. An R next to the job number indicates that
the job is currently running. An N indicates that the
job's priority has been lowered due to its long running
time. The time field indicates the real time that the
job has been running.
_R_m_b_q removes the specified jobs from the batch queue. You
must either be the owner of the job, or have super-user
privileges to remove it. _R_m_b_q -_u _l_o_g_i_n removes all
jobs owned by _l_o_g_i_n.
SEE ALSO
_m_a_i_l(1), _w_r_i_t_e(1)
AUTHOR
Allan Bricker
Printed 1/10/87 uw 2