AT(1) SysV AT(1)
NAME
at, batch - execute commands at a later time
SYNOPSIS
at time [ date ] [ + increment ]
at -r [ job ... ]
at -l [ job ... ]
batch
DESCRIPTION
at and batch read commands from standard input to be executed at a later
time. at allows you to specify when the commands should be executed,
while jobs queued with batch execute when system load level permits.
Standard output and standard error output are mailed to you, unless you
redirect them elsewhere. Shell environment variables, current directory,
umask, and ulimit are retained when you execute either at or batch. Open
file descriptors, traps, and priority are lost.
You can 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 are allowed to use at. If neither file exists, only
root can submit a job. The allow/deny files consist of one user name per
line. These files can only be modified by the superuser.
batch submits a batch job. It is equivalent to the command at now with
the exceptions that batch goes into a differenct queue and responds
earlier with 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 can also append an am or pm suffix;
otherwise the commands assume a 24-hour clock. The suffix zulu may
be used to indicate GMT. The special names noon, midnight, now, and
next are also recognized.
You can 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). Two
special "days", today and tomorrow are recognized. If you have not
provided a date, 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 a number suffixed by one of the following:
minutes, hours, days, weeks, months, or years. (The singular form is
also accepted.)
-r [ job ... ] Remove jobs previously scheduled with at.
-l [ job ... ] Report all jobs (by job number) scheduled for the
invoking user.
EXAMPLES
at and batch read from standard input the commands to be executed at a
later time. sh(1) provides different ways of specifying standard input.
Within your commands, it may be useful to redirect standard output.
This sequence can be used at a terminal:
batch
sort filename >outfile
<control-D> (hold down "CTRL" and press '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):
batch <<!
sort 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 next week
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
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.
SEE ALSO
kill(1), mail(1), nice(1), ps(1), sh(1), sort(1).
cron(1M) in Managing SysV System Software.