At (Unix)
Encyclopedia
In Unix-like
Unix-like
A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification....

 computer operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

s,
the at command
is used to schedule command
Command (computing)
In computing, a command is a directive to a computer program acting as an interpreter of some kind, in order to perform a specific task. Most commonly a command is a directive to some kind of command line interface, such as a shell....

s to be executed once, at a particular time in the future.

More precisely, it reads a series of commands from standard input and collects them into one "at-job" which is carried out at a later date.
The at-job inherits the current environment, so that it is executed in the same
working directory
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. When the process refers to a file using a simple file name or relative path , the reference is interpreted relative to the current working directory of...

 and with the same environment variable
Environment variable
Environment variables are a set of dynamic named values that can affect the way running processes will behave on a computer.They can be said in some sense to create the operating environment in which a process runs...

s set as
when it was scheduled.

It differs from cron
Cron
Cron is a time-based job scheduler in Unix-like computer operating systems. Cron enables users to schedule jobs to run periodically at certain times or dates...

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 of theirs, can use more than one job queue, and can read a list of jobs to carry out from a file instead of standard input. A sample command to compile a C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

 program at 11:45 a. m. on January 31st and e-mail the results (STDOUT and STDERR
Standard streams
In Unix and Unix-like operating systems , as well as certain programming language interfaces, the standard streams are preconnected input and output channels between a computer program and its environment when it begins execution...

) to your user ID would be:


$ echo "cc -o foo foo.c" | at 1145
$ at 1145 jan 31
at> cc -o foo foo.c
at> ^D (press Control-D while at the beginning of a line)
$ atq
1234 2011-08-12 11:45 cc -o foo foo.c user
$ atrm 1234
$ atq
$


In some Unix-like
Unix-like
A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification....

 computer operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...

s it uses a daemon
Daemon (computer software)
In Unix and other multitasking computer operating systems, a daemon is a computer program that runs as a background process, rather than being under the direct control of an interactive user...

, 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.

Using the batch command instead of at, it can be made to only run scheduled jobs if the system's load average
Load (computing)
In UNIX computing, the system load is a measure of the amount of work that a computer system performs. The load average represents the average system load over a period of time...

 is below 0.8 per default.

Windows NT
Windows NT
Windows NT is a family of operating systems produced by Microsoft, the first version of which was released in July 1993. It was a powerful high-level-language-based, processor-independent, multiprocessing, multiuser operating system with features comparable to Unix. It was intended to complement...

/2000
Windows 2000
Windows 2000 is a line of operating systems produced by Microsoft for use on personal computers, business desktops, laptops, and servers. Windows 2000 was released to manufacturing on 15 December 1999 and launched to retail on 17 February 2000. It is the successor to Windows NT 4.0, and is the...

/XP
Windows XP
Windows XP is an operating system produced by Microsoft for use on personal computers, including home and business desktops, laptops and media centers. First released to computer manufacturers on August 24, 2001, it is the second most popular version of Windows, based on installed user base...

/7 also has an at
At (Windows)
at is a command which schedules other commands to be run at a certain time. It may run a command once, or repeatedly based upon the day of the week, or the date. It is available on all Windows NT-based operating systems....

command (similar to cron
Cron
Cron is a time-based job scheduler in Unix-like computer operating systems. Cron enables users to schedule jobs to run periodically at certain times or dates...

), but it is deprecated in favor of Task Scheduler
Task Scheduler
Task Scheduler is a component of Microsoft Windows that provides the ability to schedule the launch of programs or scripts at pre-defined times or after specified time intervals. It was first introduced in the Windows 95 Plus! pack as System Agent but was renamed to Task Scheduler in Windows 98...

.

See also

  • Cron
    Cron
    Cron is a time-based job scheduler in Unix-like computer operating systems. Cron enables users to schedule jobs to run periodically at certain times or dates...

     – runs scheduled tasks at regular intervals.
  • Launchd
    Launchd
    launchd is a unified, open-source service management framework for starting, stopping and managing daemons, applications, processes, and scripts...

     – Apple Computer
    Apple Computer
    Apple Inc. is an American multinational corporation that designs and markets consumer electronics, computer software, and personal computers. The company's best-known hardware products include the Macintosh line of computers, the iPod, the iPhone and the iPad...

    's replacement for at.
  • List of Unix programs
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK