Open System Services Shell and Utilities Reference Manual (G06.25+, H06.03+)
Table Of Contents
User Commands (a - b) batch(1)
NAME
batch - Runs commands at a system-determined later time
SYNOPSIS
batch
DESCRIPTION
The batch command reads from the standard input file the names of commands to be run at a
later time. The batch command runs these jobs when the system load level permits.
The batch command is equivalent to the following at command:
at -q b now
Queue b is an at queue for batch jobs.
The user redirects the errors and output from these jobs.
Variables in the shell environment, the current directory, umask, and ulimit are retained when
the commands are run. Open file descriptors, traps, and priority are lost.
You can use batch if your login name appears in the /usr/lib/cron/at.allow file. If that file does
not exist, batch checks the /usr/lib/cron/at.deny file to determine if your login name is denied
access to batch. The at.allow and at.deny files contain one login name per line.
If neither file exists, only a user with appropriate privileges can submit a job. If the at.allow file
does exist, the login name of a user with appropriate privileges must be included in it for that
user to be able to use the command.
Environment Variables
This command supports the use of the LANG, LC_ALL, LC_CTYPE, LC_MESSAGES,
LC_TIME, and NLSPATH environment variables.
EXAMPLES
To execute a command when the system load level permits, enter:
batch
cat infile > outfile
<EOF>
where <EOF> is the End-of-File character.
FILES
/var/adm/cron Main cron directory.
/usr/lib/cron/at.allow List of allowed users.
/usr/lib/cron/at.deny List of denied users.
/var/spool/cron/atjobs Queue.
NOTES
The batch utility does not accept jobs submitted from processes whose login user ID is different
from the real user ID.
EXIT VALUES
The batch command returns the following exit values:
0 (zero) The batch utility successfully finished its processing.
>0 An error occurred. The job will not be scheduled.
527188-003 Hewlett-Packard Company 1−29