at(1)
NAME
at, batch − execute commands at a later time
SYNTAX
at time [day] [file]
at −r job...
at −l [job]
batch [file]
DESCRIPTION
The at and batch commands use a copy of the named file (standard input default) as input to sh() or csh() at a later time. A cd command to the current directory is inserted at the beginning, followed by assignments to all environment variables. When the script is run, it uses the user and group ID of the creator of the copy file.
The at command allows the user to specify when the commands should be executed, while jobs queued with batch execute when the load level of the system permits.
The environment variables, current directory, umask, and ulimit are retained when the commands are executed. However, open files, traps, and priority are lost.
Users are permitted to use the at and batch commands if their name appears in the file /usr/lib/cron/at.allow. If that file does not exist, the file /usr/lib/cron/at.deny is checked to determine if the user should be denied access to at and batch. If neither file exists, only the superuser is allowed to submit a job. If only the at.deny file exists and is empty, global usage is permitted. The allow/deny files consist of one user name per line.
The time is 1 to 4 digits. It can, but does not have to be, followed by A, P, N or M which stand for AM, PM, noon or midnight, respectively. One and two digit numbers are interpreted as hours, three and four digits to be hours and minutes. If no letters follow the digits, a 24 hour clock time is presumed.
The optional day is either a month name followed by a day number or by a day of the week. If the word week follows, the at or batch command is invoked in seven days. Both commands also recognize standard abbreviations for the days of the week and months of the year. The following are examples of legitimate commands:
at 8am jan 24
at 1530 fr week
The at programs are executed by periodic execution of the command /usr/lib/atrun from cron(.). The granularity of at depends upon how often atrun is executed.
Standard output or error output is lost unless it is redirected.
The at and batch cmmands write the job number to standard error.
OPTIONS
−r Removes jobs previously scheduled by at or batch. The number is the number reported at invocation by at or batch. Only the superuser is allowed to remove another user’s jobs.
−l Used to obtain or verify the job numbers.
RESTRICTIONS
Due to the granularity of the execution of /usr/lib/atrun, there may be bugs in scheduling jobs almost exactly 24 hours into the future.
DIAGNOSTICS
Complains about various syntax errors and times that are out of range.
FILES
/usr/lib/atrunexecutor run by cron(8) in /usr/spool/at:
yy.ddd.hhhh.*activity for year yy, day dd, hour hhhh.
lasttimedonelast hhhh
pastactivities in progress
/usr/spool/at/at.allowlist of allowed users
/usr/spool/at/at.denylist of denied users
/usr/spool/atspool directory
/usr/lib/cronXOPEN compatibility
SEE ALSO
Commands