Section: POSIX Programmer's Manual (1P)
This manual page is part of the POSIX Programmer's Manual.
The Linux implementation of this interface may differ (consult
the corresponding Linux manual page for details of Linux behavior),
or the interface may not be implemented on Linux.
--- schedule commands to be executed in a batch queue
utility shall read commands from standard input and schedule them
for execution in a batch queue. It shall be the equivalent of
at -q b -m now
is a special
queue, specifically for batch jobs. Batch jobs shall be submitted to the
batch queue with no time constraints and shall be run by the system using
algorithms, based on unspecified factors, that may vary with each
Users shall be permitted to use
if their name appears in the file
which is located in an implementation-defined directory.
If that file does not exist, the file
which is located in an implementation-defined directory,
shall be checked to determine whether the user shall be denied access to
If neither file exists, only a process with appropriate privileges
shall be allowed to submit a job. If only
exists and is empty, global usage shall be permitted. The
files shall consist of one user name per line.
The standard input shall be a text file consisting of commands
acceptable to the shell command language described in
, Shell Command Language.
The text files
which are located in an implementation-defined directory,
shall contain zero or more user names, one per line, of users who are,
respectively, authorized or denied access to the
The following environment variables shall affect the execution of
Provide a default value for the internationalization variables that are
unset or null. (See the Base Definitions volume of POSIX.1-2008,
Section 8.2, Internationalization Variables
for the precedence of internationalization variables used to determine
the values of locale categories.)
If set to a non-empty string value, override the values of all the
other internationalization variables.
Determine the locale for the interpretation of sequences of bytes of
text data as characters (for example, single-byte as opposed to
multi-byte characters in arguments and input files).
Determine the locale that should be used to affect the format and
contents of diagnostic messages written to standard error and
informative messages written to standard output.
Determine the format and contents for date and time strings written by
Determine the location of message catalogs for the processing of
Determine the name of a command interpreter to be used to invoke the
at-job. If the variable is unset or null,
shall be used. If it is set to a value other than a name for
the implementation shall do one of the following: use that shell; use
use the login shell from the user database; any of the preceding
accompanied by a warning diagnostic about which was chosen.
Determine the timezone. The job shall be submitted for execution at the
time specified by
relative to the timezone specified by the
specifies a timezone, it overrides
does not specify a timezone and
is unset or null, an unspecified default timezone shall be used.
When standard input is a terminal, prompts of unspecified format for
each line of the user input described in the STDIN section may be
written to standard output.
The following shall be written to standard error when a job has been
"job %s at %s\n", at_job_id, <date>
shall be equivalent in format to the output of:
date +"%a %b %e %T %Y"
The date and time written shall be adjusted so that they appear in the
timezone of the user (as determined by the
Neither this, nor warning messages concerning the selection of the
command interpreter, are considered a diagnostic that changes the exit
Diagnostic messages, if any, shall be written to standard error.
The following exit values shall be returned:
An error occurred.
CONSEQUENCES OF ERRORS
The job shall not be scheduled.
The following sections are informative.
It may be useful to redirect standard output within the specified
This sequence can be used at a terminal:
sort < file >outfile
This sequence, which demonstrates redirecting standard error to a pipe,
is useful in a command procedure (the sequence of output redirection
specifications is significant):
diff file1 file2 2>&1 >outfile | mailx mygroup
Early proposals described
in a manner totally separated from
even though the historical model treated it almost as a synonym for
A number of features were added to list and control batch work
separately from those in
Upon further reflection, it was decided that the benefit of this did
not merit the change to the historical interface.
option was included on the equivalent
command because it is historical practice to mail results to the
submitter, even if all job-produced output is redirected. As explained
in the RATIONALE for
keyword submits the job for immediate execution (after scheduling
delays), despite some historical systems where
would have been considered an error.
The Base Definitions volume of POSIX.1-2008,
Chapter 8, Environment Variables
Portions of this text are reprinted and reproduced in electronic form
from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
-- Portable Operating System Interface (POSIX), The Open Group Base
Specifications Issue 7, Copyright (C) 2013 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group.
(This is POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
event of any discrepancy between this version and the original IEEE and
The Open Group Standard, the original IEEE and The Open Group Standard
is the referee document. The original Standard can be obtained online at
Any typographical or formatting errors that appear
in this page are most likely
to have been introduced during the conversion of the source files to
man page format. To report such errors, see