At (command)
   HOME

TheInfoList



OR:

In
computing Computing is any goal-oriented activity requiring, benefiting from, or creating computing machinery. It includes the study and experimentation of algorithmic processes, and development of both hardware and software. Computing has scientific, e ...
, at is a
command Command may refer to: Computing * Command (computing), a statement in a computer language * COMMAND.COM, the default operating system shell and command-line interpreter for DOS * Command key, a modifier key on Apple Macintosh computer keyboards * ...
in
Unix-like A Unix-like (sometimes referred to as UN*X 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 Unix-li ...
operating systems,
Microsoft Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washing ...
Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
, and
ReactOS ReactOS is a free and open-source operating system for amd64/i686 personal computers intended to be binary-compatible with computer programs and device drivers made for Windows Server 2003 and later versions of Windows. ReactOS has been noted a ...
reactos/at.c at master · reactos/reactos · GitHub
/ref> used to schedule
command Command may refer to: Computing * Command (computing), a statement in a computer language * COMMAND.COM, the default operating system shell and command-line interpreter for DOS * Command key, a modifier key on Apple Macintosh computer keyboards * ...
s to be executed once, at a particular
time Time is the continued sequence of existence and events that occurs in an apparently irreversible succession from the past, through the present, into the future. It is a component quantity of various measurements used to sequence events, to ...
in the future.


Design


Unix-like

On Unix-like operating systems, at reads a series of commands from
standard input In computer programming, standard streams are interconnected input and output communication channels between a computer program and its environment when it begins execution. The three input/output (I/O) connections are called standard input (stdin ...
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 In computing, the working directory of a process is a directory of a hierarchical file system, if any, dynamically associated with each process. It is sometimes called the current working directory (CWD), e.g. the BSD getcwd function, or just cur ...
and with the same
environment variable An environment variable is a dynamic-named value that can affect the way running processes will behave on a computer. They are part of the environment in which a process runs. For example, a running process can query the value of the TEMP env ...
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 ti ...
, 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 In system software, a job queue ( batch queue, input queue), is a data structure maintained by job scheduler software containing jobs to run. Users submit their programs that they want executed, "jobs", to the queue for batch processing. The s ...
, and can read a list of jobs to carry out from a
computer file A computer file is a computer resource for recording data in a computer storage device, primarily identified by its file name. Just as words can be written to paper, so can data be written to a computer file. Files can be shared with and transfe ...
instead of standard input. The Linux at command was mostly written by Thomas Koenig.


Microsoft Windows and ReactOS

In addition to the
graphical user interface The GUI ( "UI" by itself is still usually pronounced . or ), graphical user interface, is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, inste ...
for
Windows Task Scheduler Task Scheduler (formerly Scheduled Tasks) is a job scheduler in Microsoft Windows that launches computer programs or scripts at pre-defined times or after specified time intervals. Microsoft introduced this component in the Microsoft Plus! for ...
in Control Panel, Windows provides an at.exe command that schedules commands and programs to run on a computer 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 ti ...
). It is available since
Windows NT Windows NT is a proprietary graphical operating system An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs. Time-sharing operating systems sc ...
, but is now deprecated in favor of schtasks. It can only be used when the Schedule service is running. When used without parameters, at.exe lists scheduled commands. at.exe cannot access tasks created or modified by Control Panel or schtasks.exe. Also, tasks created with at.exe are not interactive by default; interactivity needs to be explicitly requested. The
ReactOS ReactOS is a free and open-source operating system for amd64/i686 personal computers intended to be binary-compatible with computer programs and device drivers made for Windows Server 2003 and later versions of Windows. ReactOS has been noted a ...
implementation is based on the Windows variant. It was developed by Eric Kohl and is licensed under the
GPLv2 The GNU General Public License (GNU GPL or simply GPL) is a series of widely used free software licenses that guarantee end users the four freedoms to run, study, share, and modify the software. The license was the first copyleft for general us ...
.


Usage


Unix-like

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 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, software resources, and provides common services for computer programs. Time-sharing operating systems schedule tasks for efficient use of the system and may also in ...
s, it uses a
daemon Daimon or Daemon (Ancient Greek: , "god", "godlike", "power", "fate") originally referred to a lesser deity or guiding spirit such as the daimons of ancient Greek religion and mythology and of later Hellenistic religion and philosophy. The word ...
, 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.


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 at.exe, 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 ti ...
, runs scheduled tasks at regular intervals *
systemd systemd is a software suite that provides an array of system components for Linux operating systems. Its main aim is to unify service configuration and behavior across Linux distributions; Its primary component is a "system and service manager ...
, incorporates atd *
Launchd launchd is an init and operating system service management daemon created by Apple Inc. as part of macOS to replace its BSD-style init and SystemStarter. There have been efforts to port launchd to FreeBSD and derived systems. Components Th ...
, Apple’s
init In Unix-based computer operating systems, init (short for ''initialization'') is the first process started during booting of the computer system. Init is a daemon process that continues running until the system is shut down. It is the direct ...
software which handles ''at'' in
macOS macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and lapt ...
*
List of Unix commands This is a list of Unix commands as specified by IEEE Std 1003.1-2008, which is part of the Single UNIX Specification (SUS). These commands can be found on Unix operating systems and most Unix-like operating systems. List See also * List of G ...


References


Further reading

* *


External links

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