batch [ -csm ] [ script ]
Standard output and standard error output are mailed to the user unless they are redirected elsewhere. The shell environment variables, current directory, and umask.2v are retained when the commands are executed. Open file descriptors, traps, and priority are lost.
Users are permitted to use at if their name appears in the file /var/spool/cron/at.allow. If that file does not exist, the file /var/spool/cron/at.deny is checked to determine if the user should be denied access to at. If neither file exists, only the super-user is allowed to submit a job. If at.deny is empty, global usage is permitted. The allow/deny files consist of one user name per line.
The time may be specified as 1, 2, or 4 digits. One and two digit numbers are taken to be hours, four digits to be hours and minutes. The time may alternately be specified as two numbers separated by a colon, meaning hour:minute. A suffix am or pm may be appended; otherwise a 24-hour clock time is understood. The suffix zulu may be used to indicate GMT. The special names noon, midnight, now, and next are also recognized.
An optional date may be specified as either a month name followed by a day number (and possibly year number preceded by an optional comma) or a day of the week (fully spelled or abbreviated to three characters). Two special ``days'', today and tomorrow are recognized. If no date is given, today is assumed if the given hour is greater than the current hour and tomorrow is assumed if it is less. If the given month is less than the current month (and no year is given), next year is assumed.
The optional increment is simply a number suffixed by one of the following: minutes, hours, days, weeks, months, or years. (The singular form is also accepted.)
Thus legitimate commands include:
at and batch write the job number and schedule time to standard error.
batch submits batch jobs to queue b; this ``batch'' queue is for jobs to be run as soon as possible. A job submitted to b is scheduled to run immediately and its arguments will not be interpreted as time, date, or + increment.
batch is similar to `at now', but does not, for example, go into the same queue or respond with the error message `too late'.
This sequence can be used at a terminal:
batch nroff filename > outfile CTRL-D (hold down `control' and depress `D')
This sequence, which demonstrates redirecting standard error to a pipe, is useful in a shell procedure (the sequence of output redirection specifications is significant):
To have a job reschedule itself, invoke at from within the shell procedure, by including code similar to the following within the shell file:
at 1900 thursday next week shellfile
Shell interpreter specifiers (such as, !/bin/csh) in the beginning of script are ignored.
Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97