batch(1) batch(1)
NAME
batch - execute commands at a later time
SYNOPSIS
batch <RETURN>
command ... <RETURN>
<CTRL-D>
DESCRIPTION
batch reads commands from standard input, puts them in a queue, and
executes them when system load level permits.
Standard output and standard error output of the commands to be exe-
cuted are sent to the user by mail unless they are redirected else-
where. The environment variables, the current directory, the permis-
sions for new files [see umask(1)] and the maximum permissible file
size [see ulimit(1)] are retained, but open files and priorities are
lost, and the trap(1) command (shell built-in for catching signals) is
deactivated.
batch writes the job number and the schedule time to standard error.
Jobs scheduled with batch are run even if the user who scheduled them
logs out of the system.
batch has exactly the same effect as at -qb with no further options.
Before the call
If the file /etc/cron.d/at.allow exists, you can only use batch if
your login name appears in it.
If the file /etc/cron.d/at.allow does not exist, you can only use
batch if your login name does not appear in the file
/etc/cron.d/at.deny.
If neither /etc/cron.d/at.allow nor /etc/cron.d/at.deny exists, only
the system administrator is allowed to use batch.
If only an empty deny file exists, for example, everyone is allowed to
use batch.
Only the system administrator is allowed to create and modify the
allow and deny files. Each line in these files contains precisely one
login name.
Page 1 Reliant UNIX 5.44 Printed 11/98
batch(1) batch(1)
OPERANDS
command
Any command or shell script. You can specify more than one
command at a time, using semicolons or newlines to separate them.
The resulting command list is executed under a single job number.
ERROR MESSAGES
at: you are not authorized to use at. Sorry.
Permission to use batch denied (see Before the call).
LOCALE
The LCMESSAGES environment variable governs the language in which
message texts are displayed.
The LCTIME environment variable governs the format of the date and
time specifications.
If LCMESSAGES or LCTIME is undefined or is defined as the null
string, it defaults to the value of LANG. If LANG is likewise unde-
fined or null, the system acts as if it were not internationalized.
If any of the locale variables has an invalid value, the system acts
as if none of the variables were set.
The LCALL environment variable governs the entire internationalized
environment. LCALL takes precedence over all other environment vari-
ables in the area of internationalization.
EXAMPLES
In the following example, the standard input is redirected, and batch
takes its work from the file jobs:
$ batch < jobs
job 604763316.b at Wed Mar 1 14:48:36 1989
The jobs contained in the file jobs are run in sequential order as
background processes by batch. When the job is complete, you can have
the result displayed on the screen by mail.
FILES
/etc/cron.d/at.allow
List of login names with permission to use batch. One login name
is entered per line.
/etc/cron.d/at.deny
List of login names explicitly denied permission to use batch.
One login name is entered per line.
Page 2 Reliant UNIX 5.44 Printed 11/98
batch(1) batch(1)
/var/spool/cron/atjobs
Directory containing a separate file for each batch job which has
not yet been executed. Each batch job is allocated a file of its
own with the filename jobnumber.b.
/etc/cron.d/queuedefs
File containing scheduling information.
SEE ALSO
at(1), crontab(1), mail(1), ulimit(1), ulimit(2).
Page 3 Reliant UNIX 5.44 Printed 11/98