BATCH(1P)
πΈ BATCH(1P) β the POSIX Programmer's Manual one π
okay bestie, quick lore drop before we get into it: this page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (so go peek at the corresponding Linux manual page for the deets on Linux behavior), or honestly the interface may not be implemented on Linux at all. π
β¨ PROLOG β¨
So like β 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. That's it, that's the whole prolog. π
π NAME π
batch β schedule commands to be executed in a batch queue. it's giving "queue girlie" and honestly? iconic. π
π¦ SYNOPSIS π¦
batch
π DESCRIPTION π
So the batch utility shall read commands from standard input and schedule them for execution in a batch queue. No cap. It's literally the equivalent of this command right here:
at -q b -m now
where queue b is a special at queue, specifically for batch jobs (iykyk). 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 invocation of batch. yeah, unspecified. don't ask, the system is mysterious like that. π§
Now the access-control tea, because this part matters bestie:
Users shall be permitted to use batch if their name appears in the file at.allow, which is located in an implementation-defined directory. If that file does not exist, the file at.deny, which is located in an implementation-defined directory, shall be checked to determine whether the user shall be denied access to batch. If neither file exists, only a process with appropriate privileges shall be allowed to submit a job. If only at.deny exists and is empty, global usage shall be permitted. The at.allow and at.deny files shall consist of one user name per line. periodt. π
β¨ OPTIONS β¨
None. literally none. zero. the void. π«Ά
π OPERANDS π
None. also none. we stay unbothered. π
π STDIN π
The standard input shall be a text file consisting of commands acceptable to the shell command language described in Chapter 2, Shell Command Language. so like, real commands, not vibes. π
π INPUT FILES π
The text files at.allow and at.deny, 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 at and batch utilities. that's the whole guest list, bestie. π
πΈ ENVIRONMENT VARIABLES πΈ
The following environment variables shall affect the execution of batch:
LANGβ Provide a default value for the internationalization variables that are unset or null. (See the Base Definitions volume of POSIX.1β2017, Section 8.2, Internationalization Variables for the precedence of internationalization variables used to determine the values of locale categories.)LC_ALLβ If set to a non-empty string value, override the values of all the other internationalization variables. she's the main character, she overrides everyone. πLC_CTYPEβ 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).LC_MESSAGESβ 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.LC_TIMEβ Determine the format and contents for date and time strings written bybatch.NLSPATHβ Determine the location of message catalogs for the processing ofLC_MESSAGES.SHELLβ Determine the name of a command interpreter to be used to invoke the at-job. If the variable is unset or null,shshall be used. If it is set to a value other than a name forsh, the implementation shall do one of the following: use that shell; usesh; use the login shell from the user database; any of the preceding accompanied by a warning diagnostic about which was chosen. so many options, so little certainty. πTZβ Determine the timezone. The job shall be submitted for execution at the time specified by timespec or-ttime relative to the timezone specified by theTZvariable. If timespec specifies a timezone, it overridesTZ. If timespec does not specify a timezone andTZis unset or null, an unspecified default timezone shall be used.
π¦ ASYNCHRONOUS EVENTS π¦
Default. she's not doing anything extra, she's just existing. π
π STDOUT π
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. mysterious prompts. we don't know what they look like. nobody does. β¨
π STDERR π
The following shall be written to standard error when a job has been successfully submitted:
"job %s at %s\n", at_job_id, <date>
where 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 TZ variable).
Neither this, nor warning messages concerning the selection of the command interpreter, are considered a diagnostic that changes the exit status. so like, chill, it's just a lil message, not a crisis. π«Ά
Diagnostic messages, if any, shall be written to standard error.
π OUTPUT FILES π
None. nothing. nada. the output files are not giving. π
π EXTENDED DESCRIPTION π
None.
β EXIT STATUS β
The following exit values shall be returned:
0β Successful completion. slay. β¨>0β An error occurred. not slay. π
π₯ CONSEQUENCES OF ERRORS π₯
The job shall not be scheduled. that's it, that's the consequence, and it's brutal. π
The following sections are informative.
π APPLICATION USAGE π
It may be useful to redirect standard output within the specified commands. lowkey a good idea, highkey recommended. π‘
πΈ EXAMPLES πΈ
- This sequence can be used at a terminal:
batch
sort < file >outfile
EOT
- This sequence, which demonstrates redirecting standard error to a pipe, is useful in a command procedure (the sequence of output redirection specifications is significant β yes, the order matters, bestie, do not rearrange her):
batch <<!
diff file1 file2 2>&1 >outfile | mailx mygroup
!
π§ RATIONALE π§
Early proposals described batch in a manner totally separated from at, even though the historical model treated it almost as a synonym for at -qb. A number of features were added to list and control batch work separately from those in at. Upon further reflection, it was decided that the benefit of this did not merit the change to the historical interface. so basically: they thought about it and then went "nah". π
The -m option was included on the equivalent at 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 at, the now keyword submits the job for immediate execution (after scheduling delays), despite some historical systems where at now would have been considered an error.
π¦ FUTURE DIRECTIONS π¦
None. the future is empty, we live in the present. β¨
π SEE ALSO π
at
The Base Definitions volume of POSIX.1β2017, Chapter 8, Environment Variables
π COPYRIGHT π
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. 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 http://www.opengroup.org/unix/online.html .
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 https://www.kernel.org/doc/man-pages/reporting_bugs.html .
and that's the whole page, bestie!! this one came to you from IEEE/The Open Group, dated 2017, filed under BATCH(1P). go schedule something cute. mwah. π πβ¨
π¦ where this page comes from
- alpine 3.22: man-pages-posix 2017a-r0 Β· custom
- alpine 3.23: man-pages-posix 2017a-r0 Β· custom
- alpine 3.24: man-pages-posix 2017a-r0 Β· custom
- arch rolling: man-pages 6.19-1
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages-posix 2017a
- opensuse-leap 16.0: man-pages-posix 2017a-160000.4.1 Β· SUSE-IEEE
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms