logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

batch.1p (7498B)


  1. '\" et
  2. .TH BATCH "1P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. batch
  12. \(em schedule commands to be executed in a batch queue
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. \fIbatch\fR
  17. .fi
  18. .SH DESCRIPTION
  19. The
  20. .IR batch
  21. utility shall read commands from standard input and schedule them
  22. for execution in a batch queue. It shall be the equivalent of
  23. the command:
  24. .sp
  25. .RS 4
  26. .nf
  27. at -q b -m now
  28. .fi
  29. .P
  30. .RE
  31. .P
  32. where queue
  33. .IR b
  34. is a special
  35. .IR at
  36. queue, specifically for batch jobs. Batch jobs shall be submitted to the
  37. batch queue with no time constraints and shall be run by the system using
  38. algorithms, based on unspecified factors, that may vary with each
  39. invocation of
  40. .IR batch .
  41. .P
  42. Users shall be permitted to use
  43. .IR batch
  44. if their name appears in the file
  45. .BR at.allow
  46. which is located in an implementation-defined directory.
  47. If that file does not exist, the file
  48. .BR at.deny ,
  49. which is located in an implementation-defined directory,
  50. shall be checked to determine whether the user shall be denied access to
  51. .IR batch .
  52. If neither file exists, only a process with appropriate privileges
  53. shall be allowed to submit a job. If only
  54. .BR at.deny
  55. exists and is empty, global usage shall be permitted. The
  56. .BR at.allow
  57. and
  58. .BR at.deny
  59. files shall consist of one user name per line.
  60. .SH OPTIONS
  61. None.
  62. .SH OPERANDS
  63. None.
  64. .SH STDIN
  65. The standard input shall be a text file consisting of commands
  66. acceptable to the shell command language described in
  67. .IR "Chapter 2" ", " "Shell Command Language".
  68. .SH "INPUT FILES"
  69. The text files
  70. .BR at.allow
  71. and
  72. .BR at.deny ,
  73. which are located in an implementation-defined directory,
  74. shall contain zero or more user names, one per line, of users who are,
  75. respectively, authorized or denied access to the
  76. .IR at
  77. and
  78. .IR batch
  79. utilities.
  80. .SH "ENVIRONMENT VARIABLES"
  81. The following environment variables shall affect the execution of
  82. .IR batch :
  83. .IP "\fILANG\fP" 10
  84. Provide a default value for the internationalization variables that are
  85. unset or null. (See the Base Definitions volume of POSIX.1\(hy2017,
  86. .IR "Section 8.2" ", " "Internationalization Variables"
  87. for the precedence of internationalization variables used to determine
  88. the values of locale categories.)
  89. .IP "\fILC_ALL\fP" 10
  90. If set to a non-empty string value, override the values of all the
  91. other internationalization variables.
  92. .IP "\fILC_CTYPE\fP" 10
  93. Determine the locale for the interpretation of sequences of bytes of
  94. text data as characters (for example, single-byte as opposed to
  95. multi-byte characters in arguments and input files).
  96. .IP "\fILC_MESSAGES\fP" 10
  97. .br
  98. Determine the locale that should be used to affect the format and
  99. contents of diagnostic messages written to standard error and
  100. informative messages written to standard output.
  101. .IP "\fILC_TIME\fP" 10
  102. Determine the format and contents for date and time strings written by
  103. .IR batch .
  104. .IP "\fINLSPATH\fP" 10
  105. Determine the location of message catalogs for the processing of
  106. .IR LC_MESSAGES .
  107. .IP "\fISHELL\fP" 10
  108. Determine the name of a command interpreter to be used to invoke the
  109. at-job. If the variable is unset or null,
  110. .IR sh
  111. shall be used. If it is set to a value other than a name for
  112. .IR sh ,
  113. the implementation shall do one of the following: use that shell; use
  114. .IR sh ;
  115. use the login shell from the user database; any of the preceding
  116. accompanied by a warning diagnostic about which was chosen.
  117. .IP "\fITZ\fP" 10
  118. Determine the timezone. The job shall be submitted for execution at the
  119. time specified by
  120. .IR timespec
  121. or
  122. .BR \-t
  123. .IR time
  124. relative to the timezone specified by the
  125. .IR TZ
  126. variable. If
  127. .IR timespec
  128. specifies a timezone, it overrides
  129. .IR TZ .
  130. If
  131. .IR timespec
  132. does not specify a timezone and
  133. .IR TZ
  134. is unset or null, an unspecified default timezone shall be used.
  135. .SH "ASYNCHRONOUS EVENTS"
  136. Default.
  137. .SH STDOUT
  138. When standard input is a terminal, prompts of unspecified format for
  139. each line of the user input described in the STDIN section may be
  140. written to standard output.
  141. .SH STDERR
  142. The following shall be written to standard error when a job has been
  143. successfully submitted:
  144. .sp
  145. .RS 4
  146. .nf
  147. "job %s at %s\en", \fIat_job_id\fR, <\fIdate\fR>
  148. .fi
  149. .P
  150. .RE
  151. .P
  152. where
  153. .IR date
  154. shall be equivalent in format to the output of:
  155. .sp
  156. .RS 4
  157. .nf
  158. date +"%a %b %e %T %Y"
  159. .fi
  160. .P
  161. .RE
  162. .P
  163. The date and time written shall be adjusted so that they appear in the
  164. timezone of the user (as determined by the
  165. .IR TZ
  166. variable).
  167. .P
  168. Neither this, nor warning messages concerning the selection of the
  169. command interpreter, are considered a diagnostic that changes the exit
  170. status.
  171. .P
  172. Diagnostic messages, if any, shall be written to standard error.
  173. .SH "OUTPUT FILES"
  174. None.
  175. .SH "EXTENDED DESCRIPTION"
  176. None.
  177. .SH "EXIT STATUS"
  178. The following exit values shall be returned:
  179. .IP "\00" 6
  180. Successful completion.
  181. .IP >0 6
  182. An error occurred.
  183. .SH "CONSEQUENCES OF ERRORS"
  184. The job shall not be scheduled.
  185. .LP
  186. .IR "The following sections are informative."
  187. .SH "APPLICATION USAGE"
  188. It may be useful to redirect standard output within the specified
  189. commands.
  190. .SH EXAMPLES
  191. .IP " 1." 4
  192. This sequence can be used at a terminal:
  193. .RS 4
  194. .sp
  195. .RS 4
  196. .nf
  197. batch
  198. sort < file >outfile
  199. EOT
  200. .fi
  201. .P
  202. .RE
  203. .RE
  204. .IP " 2." 4
  205. This sequence, which demonstrates redirecting standard error to a pipe,
  206. is useful in a command procedure (the sequence of output redirection
  207. specifications is significant):
  208. .RS 4
  209. .sp
  210. .RS 4
  211. .nf
  212. batch <<!
  213. diff file1 file2 2>&1 >outfile | mailx mygroup
  214. !
  215. .fi
  216. .P
  217. .RE
  218. .RE
  219. .SH RATIONALE
  220. Early proposals described
  221. .IR batch
  222. in a manner totally separated from
  223. .IR at ,
  224. even though the historical model treated it almost as a synonym for
  225. .IR at
  226. .BR \-qb .
  227. A number of features were added to list and control batch work
  228. separately from those in
  229. .IR at .
  230. Upon further reflection, it was decided that the benefit of this did
  231. not merit the change to the historical interface.
  232. .P
  233. The
  234. .BR \-m
  235. option was included on the equivalent
  236. .IR at
  237. command because it is historical practice to mail results to the
  238. submitter, even if all job-produced output is redirected. As explained
  239. in the RATIONALE for
  240. .IR at ,
  241. the
  242. .BR now
  243. keyword submits the job for immediate execution (after scheduling
  244. delays), despite some historical systems where
  245. .IR at
  246. .BR now
  247. would have been considered an error.
  248. .SH "FUTURE DIRECTIONS"
  249. None.
  250. .SH "SEE ALSO"
  251. .IR "\fIat\fR\^"
  252. .P
  253. The Base Definitions volume of POSIX.1\(hy2017,
  254. .IR "Chapter 8" ", " "Environment Variables"
  255. .\"
  256. .SH COPYRIGHT
  257. Portions of this text are reprinted and reproduced in electronic form
  258. from IEEE Std 1003.1-2017, Standard for Information Technology
  259. -- Portable Operating System Interface (POSIX), The Open Group Base
  260. Specifications Issue 7, 2018 Edition,
  261. Copyright (C) 2018 by the Institute of
  262. Electrical and Electronics Engineers, Inc and The Open Group.
  263. In the event of any discrepancy between this version and the original IEEE and
  264. The Open Group Standard, the original IEEE and The Open Group Standard
  265. is the referee document. The original Standard can be obtained online at
  266. http://www.opengroup.org/unix/online.html .
  267. .PP
  268. Any typographical or formatting errors that appear
  269. in this page are most likely
  270. to have been introduced during the conversion of the source files to
  271. man page format. To report such errors, see
  272. https://www.kernel.org/doc/man-pages/reporting_bugs.html .