At (command)

In computing,   is a command in Unix-like operating systems, Microsoft Windows, and ReactOS used to schedule commands to be executed once, at a particular time in the future.

Unix-like
On Unix-like operating systems,  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, which is used for recurring executions (e.g. once an hour, every Tuesday, January 1 every year). As with, many Unix systems allow the administrator to restrict access to the   command. can be made to mail a user when done carrying out a scheduled job, can use more than one job queue, and can read a list of jobs to carry out from a file instead of standard input. The Linux  command was mostly written by Thomas Koenig.

Microsoft Windows and ReactOS
In addition to the graphical user interface for Windows Task Scheduler in Control Panel, Windows provides an  command that schedules commands and programs to run on a computer at a specified time and date (similar to  ). It is available since Windows NT, but is now deprecated in favor of. It can only be used when the Schedule service is running. When used without parameters,  lists scheduled commands. cannot access tasks created or modified by Control Panel or. Also, tasks created with  are not interactive by default; interactivity needs to be explicitly requested.

The ReactOS implementation is based on the Windows variant. It was developed by Eric Kohl and is licensed under the GPLv2.

Unix-like
A sample command to compile a C program at 11:45 a. m. on January 31 would be:

or

The   program lists the currently queued jobs, while   removes jobs from the queue:

In some Unix-like computer operating systems, it uses a daemon,  , which waits in the background periodically checking the list of jobs to do and executing those at their scheduled time on behalf of  .

Variants
The   command can be used instead of at to only run scheduled jobs if the system's load average is below a certain value.

Microsoft Windows and ReactOS
To use, the user must be a member of the local Administrators group.

The command-syntax is:

at [\\ComputerName] [{[ID] [/delete]|/delete [/yes]}] at [[\\ComputerName] hours:minutes [/interactive] [{/every:date[,...]|/next:date[,...]}] command]


 * : This parameter specifies a remote computer. If it is omitted, at schedules the commands and programs on the local computer.
 * : This parameter specifies the identification number assigned to a scheduled command.
 * : This parameter cancels a scheduled command. If ID is omitted, all of the scheduled commands on the computer are canceled.
 * : This parameter answers yes to all queries from the system when you delete scheduled events.
 * : This parameter specifies the time when to run the command.
 * : This parameter allows the given command to interact with the desktop of the user who is logged on at the time command runs.
 * : This parameter runs the given command on every specified day or days of the week or month.
 * : This parameter specifies the date when to run the given command. One or more days of the week can be specified. If date is omitted, at uses the current day of the month.
 * : This parameter runs command on the next occurrence of the day.
 * : This parameter specifies the Windows command, program (that is, .exe or .com file), or batch program (that is, .bat or .cmd file) that will be run.
 * : Displays help for the command.