At (command)
   HOME

TheInfoList



OR:

at is a
shell Shell may refer to: Architecture and design * Shell (structure), a thin structure ** Concrete shell, a thin shell of concrete, usually with no interior columns or exterior buttresses Science Biology * Seashell, a hard outer layer of a marine ani ...
command for scheduling commands to be executed at a future
time Time is the continuous progression of existence that occurs in an apparently irreversible process, irreversible succession from the past, through the present, and into the future. It is a component quantity of various measurements used to sequ ...
; once. The command was developed for
Unix Unix (, ; trademarked as UNIX) is a family of multitasking, multi-user computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
and is available on
Unix Unix (, ; trademarked as UNIX) is a family of multitasking, multi-user computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
and
Unix-like A Unix-like (sometimes referred to as UN*X, *nix or *NIX) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Uni ...
systems,
Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
, and
ReactOS ReactOS is a Free and open-source software, free and open-source operating system for i586/amd64 personal computers that is intended to be binary-code compatibility, binary-compatible with computer programs and device drivers developed for Wind ...
.reactos/at.c at master · reactos/reactos · GitHub
/ref>


Variants


Unix-like

On Unix-like operating systems, 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 variable An environment variable is a user-definable value that can affect the way running processes will behave on a computer. Environment variables are part of the environment in which a process runs. For example, a running process can query the va ...
s set as when it was scheduled. It differs from
cron The cron command-line utility is a job scheduler on Unix-like operating systems. Users who set up and maintain software environments use cron to schedule jobs (commands or shell scripts), also known as cron jobs, to run periodically at fixed t ...
, 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 command. at 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 at command was mostly written by Thomas Koenig. The command can be used instead of to only run scheduled jobs if the system's load average is below a certain value.


Examples

A sample command to compile a C program at 11:45 a.m. on January 31 would be: $ echo "cc -o foo foo.c" , at 1145 jan 31 or $ at 1145 jan 31 at> cc -o foo foo.c at> ^D #(press Control-D while at the beginning of a line) The 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 system An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ...
s, 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 at.


Windows and ReactOS

In addition to the
graphical user interface A graphical user interface, or GUI, is a form of user interface that allows user (computing), users to human–computer interaction, interact with electronic devices through Graphics, graphical icon (computing), icons and visual indicators such ...
for Windows Task Scheduler in Control Panel, Windows provides an at shell command that schedules operations to run at a specified time and date (similar to
cron The cron command-line utility is a job scheduler on Unix-like operating systems. Users who set up and maintain software environments use cron to schedule jobs (commands or shell scripts), also known as cron jobs, to run periodically at fixed t ...
). It is available since
Windows NT Windows NT is a Proprietary software, proprietary Graphical user interface, graphical operating system produced by Microsoft as part of its Windows product line, the first version of which, Windows NT 3.1, was released on July 27, 1993. Original ...
, but is now deprecated in favor of schtasks. It can only be used when the Schedule service is running. When used without parameters, at lists scheduled commands. at cannot access tasks created or modified by Control Panel or schtasks.exe. Also, tasks created with at are not interactive by default; interactivity needs to be explicitly requested. The
ReactOS ReactOS is a Free and open-source software, free and open-source operating system for i586/amd64 personal computers that is intended to be binary-code compatibility, binary-compatible with computer programs and device drivers developed for Wind ...
implementation is based on the Windows implementation. It was developed by Eric Kohl and is licensed under the
GPLv2 The GNU General Public Licenses (GNU GPL or simply GPL) are a series of widely used free software licenses, or copyleft, ''copyleft'' licenses, that guarantee end users the freedom to run, study, share, or modify the software. The GPL was th ...
.


Examples

To use at, the user must be a member of the local Administrators group. The command-syntax is:
at  \ComputerName[]
at [ \ComputerNamehours:minutes [/interactive] [] command]
; \\ ComputerName : This parameter specifies a remote computer. If it is omitted, at schedules the commands and programs on the local computer. ; ID : This parameter specifies the identification number assigned to a scheduled command. ; /delete : This parameter cancels a scheduled command. If ID is omitted, all of the scheduled commands on the computer are canceled. ; /yes : This parameter answers yes to all queries from the system when you delete scheduled events. ; hours : minutes : This parameter specifies the time when to run the command. ; /interactive : This parameter allows the given command to interact with the desktop of the user who is logged on at the time command runs. ; /every: : This parameter runs the given command on every specified day or days of the week or month. ; date : 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. ; /next: : This parameter runs command on the next occurrence of the day. ; command : 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.


See also

*
cron The cron command-line utility is a job scheduler on Unix-like operating systems. Users who set up and maintain software environments use cron to schedule jobs (commands or shell scripts), also known as cron jobs, to run periodically at fixed t ...
, runs scheduled tasks at regular intervals * Launchd, Apple’s init software which handles ''at'' in
macOS macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
* List of POSIX commands * schtasks (Microsoft command shell) * systemd, incorporates atd


References


Further reading

* *


External links

* * {{Windows commands At Unix SUS2008 utilities Unix process- and task-management-related software ReactOS commands Windows commands Windows administration