at

Schedule commands to execute at a specified time

TLDR

Create commands interactively and execute them in 5 minutes
$ at now + 5 minutes
Execute commands from stdin at a specific time
$ echo "command" | at 1000
Execute commands from a file at a specific time
$ at -f [path/to/file] 9:30 PM Tue
List all queued jobs
$ at -l
View a specified job
$ at -c [job_number]
Remove a job from the queue
$ atrm [job_number]

SYNOPSIS

at [-q queue] [-f file] [-mMlv] timespecat [-q queue] [-f file] [-mMkv] [-t time]at -c job ...at [-rd] job ...

DESCRIPTION

at executes commands at a specified time. Commands are read from standard input or a file and executed later. Results are sent to the user's mail. The atd daemon must be running for jobs to execute.

PARAMETERS

-f file

Read commands from file instead of standard input
-l
List all queued jobs (alias for atq)
-c job
Print (cat) the commands of the specified job to standard output
-m
Send mail to the user when the job completes, even if there was no output
-M
Never send mail to the user
-q queue
Use the specified queue. A queue is a single letter (a-z, A-Z); queues with higher letters run with increased niceness. The "=" queue is reserved for currently running jobs.
-t time
Run the job at the given time, in the format [[CC]YY]MMDDhhmm[.ss]
-r job, -d job
Delete the specified job (alias for atrm)
-b
Alias for batch
-v
Show the time the job will be executed before reading it

CONFIGURATION

/etc/at.allow

If this file exists, only users listed in it can schedule jobs with at.
/etc/at.deny
Users listed in this file are denied access to at. Ignored if at.allow exists.

INSTALL

sudo apt install at
sudo dnf install at
sudo pacman -S at
sudo apk add at
sudo zypper install at
nix profile install nixpkgs#at

CAVEATS

Requires the atd daemon to be running. Time can be specified in various formats: HH:MM, midnight, noon, teatime (4pm), or relative times like "now + 5 minutes".

HISTORY

Part of the traditional Unix job scheduling system, available since early Unix in the 1970s. The modern Linux at package was mostly written by Thomas Koenig and has since been maintained by various Debian contributors.

SEE ALSO

atq(1), atrm(1), cron(8), batch(1)

RESOURCES

Source code