at
Processes and system
Usage
at <time> (then type the command, Ctrl+D to finish)Runs a command exactly once at a time you name; the atd daemon has to be running (often it is not even installed), and the output is mailed to you rather than printed.
Common flags
| Flag | Meaning |
|---|---|
| at 15:00 / at 3pm tomorrow | Absolute times, in many spellings. |
| at now + 10 minutes | Relative times: minutes, hours, days, weeks. |
| -f <file> | Run a script file instead of typing the command. |
| atq | List the jobs you have queued (same as at -l). |
| atrm <n> | Delete queued job number n (same as at -r). |
Examples
echo "systemctl restart nginx" | sudo at now + 5 minutesOne restart, five minutes from now.
at -f deploy.sh 02:00Run a script once at 2am.
atqCheck what is still queued.
What is running and what is eating the machine. Identifying it comes before killing it.
How to read this
- Square brackets [ ] mark a part you may leave out.
- An ellipsis … means you can list more than one.
- Flags are case-sensitive — in some commands -r and -R do different things.
Questions
Q. What does at do?
Runs a command exactly once at a time you name; the atd daemon has to be running (often it is not even installed), and the output is mailed to you rather than printed.
Q. How do I type it?
at <time> (then type the command, Ctrl+D to finish) — square brackets mark the parts you can leave out.
Q. How many flags are worth knowing?
5 are listed here; the full set is in man at. This command sits under Processes and system.
Related commands
man page: man at