This article includes a list of references, related reading or external links, but its sources remain unclear because it lacks inline citations. (March 2013) (Learn how and when to remove this template message)
at reads a series of commands from standard input and collects them into one "at-job" which is carried out at a later date. The job inherits the current environment, so that it is executed in the same working directory and with the same environment variables set as when it was scheduled.
It differs from
cron, which is used for recurring executions (e.g. once an hour, every Tuesday, January 1 every year). As with
cron, many Unix systems allow the administrator to restrict access to the
at can be made to mail a user when done carrying out a scheduled job of his, can use more than one job queue, and can read a list of jobs to carry out from a file instead of standard input.
A sample command to compile a C program at 11:45 a. m. on January 31st would be:
$ echo "cc -o foo foo.c" | at 1145 jan 31
$ at 1145 jan 31 at> cc -o foo foo.c at> ^D #(press Control-D while at the beginning of a line)
atq program lists the currently queued jobs, while
atrm removes jobs from the queue:
$ atq 1234 2011-08-12 11:45 cc -o foo foo.c user $ atrm 1234 $ atq $
In some Unix-like computer operating systems it uses a daemon,
atd, which waits in the background periodically checking the list of jobs to do and executing those at their scheduled time on behalf of
batch command can be used instead of at to only run scheduled jobs if the system's load average is below a certain value.
- Cron, runs scheduled tasks at regular intervals
- systemd, incorporates atd
- Launchd, Apple Computer's replacement for at
- List of Unix programs