batch Command Purpose Runs jobs when the system load level permits. Syntax batch Description The batch command reads from standard input the names of commands to be run at a later time and runs the jobs when the system load level permits. The batch command mails you all output from stan- dard output and standard error for the scheduled commands, unless you redirect that output. It also writes the job number and the scheduled time to standard error. When the batch command is executed, it retains variables in the shell environment, and the current directory: however, it does not retain open file descriptors, traps, and priority. Exit Status This command returns the following exit values: 0 Successful completion >0 An error occurred. Examples To run a job when the system load permits, enter: batch <&1 >outfile | mail $LOGNAME ! This example shows the use of a "Here Document" to send standard input to the at command. The order of redirections is important here, so that only error messages are sent into the pipe to the mail command. If you re- verse the order, both standard error and standard output are sent to outfile. Implementation Specifics This command is part of Base Operating System (BOS) Runtime. Files /usr/bin/batch Indicates the batch command. /bin/batch Symbolic link to the batch command. /var/adm/cron Indicates the main cron command directory. /var/spool/cron/atjobs Indicates the spool area. Related Information Input and Output Redirection Overview in AIX Version 3.2 System User's Guide: Base and Devices describes how the operating system processes input and output. National Language Support Overview in AIX Version 3.2 General Programming Concepts explains collating sequences, equivalence classes, and locale. Shells Overview in AIX Version 3.2 System User's Guide: Base and Devices describes what shells are, the different types of shells, and how shells affect the way commands are interpreted. The at command, bsh command, cron command, csh command, kill command, ksh command, mail command, nice command, ps command, bsh command. Korn Shell Special Commands and Bourne Shell Special Commands in AIX Version 3.2 System User's Guide: Base and Devices.