BATCH(1) DOMAIN/IX Reference Manual (SYS5) BATCH(1)
NAME
at, batch - execute commands at a later time
USAGE
at time [ date ] [ + increment ]
at -rjob...
at -l [ job ... ]
batch
DESCRIPTION
At and batch read commands from standard input to be exe-
cuted at a later time. At allows you to specify when the
commands should be executed, while jobs queued with batch
executes when the system load level permits.
Standard output and standard error output are mailed to you,
unless you redirect them elsewhere. The Shell environment
variables, current directory, and file-creation mode mask
setting are retained when you execute either at or batch.
Open file descriptors, traps, and priority are lost.
You are permitted to use at if your name appears in the file
/usr/lib/cron/at.allow. If that file does not exist, the
file /usr/lib/cron/at.deny determines whether or not you
should be denied access to at. If neither file exists, only
root is allowed to submit a job. If either file is at.deny,
global usage is permitted. The allow/deny files consist of
one user name per line.
Batch submits a batch job. It is almost equivalent to the
command at now, but batch goes into a different queue and
responds much earlier with any error messages.
OPTIONS
The following options apply to at only:
[time] [+ increment]
Specify time when commands are to be executed. One- and
two-digit numbers indicate hours, four-digit numbers
show hours and minutes. You may alternately specify
the time as two numbers separated by a colon, meaning
hour:minute. You may also append an am or pm suffix;
otherwise, the commands will assume a 24-hour clock.
The suffix zulu may be used to indicate GMT. The spe-
cial names of noon, midnight, now, and next are also
recognized.
You may specify an optional date as either a month name
followed by a day number (and possibly a year number
preceded by an optional comma), or a day of the week
(fully spelled or abbreviated to three characters).
Printed 6/10/85 BATCH-1
BATCH(1) DOMAIN/IX Reference Manual (SYS5) BATCH(1)
Two special ``days,'' today and tomorrow are recog-
nized. If you have not provided a date, today is
assumed if the given hour is greater than the current
hour, and tomorrow 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.)
-rjob
Remove jobs previously scheduled by at or batch. You
can only remove your own jobs unless you are the
super-user.
-l[job]
Report all jobs (by job number) scheduled for the
invoking user.
EXAMPLES
The at and batch commands read from standard input the com-
mands to be executed at a later time. Sh (1) provides dif-
ferent ways of specifying standard input. Within your com-
mands, it may be useful to redirect standard output.
This sequence can be used at a terminal:
batch
nroff filename >outfile
<CONTROL-Z>
This sequence, which demonstrates redirecting standard error
to a pipe, is useful in a Shell procedure (the sequence of
output redirection specifications is significant):
batch <<!
nroff filename 2>&1 >outfile | mail loginid
!
To have a job reschedule itself, invoke at from within the
Shell procedure, by including code similar to the following
within the Shell file:
echo sh Shellfile | at 1900 thursday
Some examples of simple, yet valid, at command lines are
shown here:
at 0815am Jan 24
at 8:15am Jan 24
at now + 1 day
at 5 pm Friday
BATCH-2 Printed 6/10/85
BATCH(1) DOMAIN/IX Reference Manual (SYS5) BATCH(1)
FILES
/usr/lib/cron - main cron directory
/usr/lib/cron/at.allow - list of allowed users
/usr/lib/cron/at.deny - list of denied users
/usr/lib/cron/queue - scheduling information
/usr/spool/cron/atjobs - spool area
DIAGNOSTICS
Complains about various syntax errors and times out of
range.
RELATED INFORMATION
kill (1), mail (1), nice (1), ps (1), sh (1).
Printed 6/10/85 BATCH-3