Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
At (command)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Unix-like=== On Unix-like operating systems, <code>at</code> 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]]s set as when it was scheduled. It differs from <code>[[cron]]</code>, which is used for recurring executions (e.g. once an hour, every Tuesday, January 1 every year). As with <code>cron</code>, many Unix systems allow the administrator to restrict access to the <code>at</code> command. <code>at</code> 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 [[computer file|file]] instead of standard input. The Linux <code>at</code> command was mostly written by Thomas Koenig.<ref>{{Cite web|url=https://linux.die.net/man/1/at|title=At(1) - Linux man page}}</ref> The '''<code>{{visible anchor|batch}}</code>''' command can be used instead of {{code|at}} to only run scheduled jobs if the system's [[Load (computing)|load average]] is below a certain value. ====Examples==== A sample command to compile a [[C (programming language)|C]] program at 11:45 a.m. on January 31 would be: <syntaxhighlight lang="console"> $ echo "cc -o foo foo.c" | at 1145 jan 31 </syntaxhighlight> or <syntaxhighlight lang="console"> $ at 1145 jan 31 at> cc -o foo foo.c at> ^D #(press Control-D while at the beginning of a line) </syntaxhighlight> The '''<code>atq</code>''' program lists the currently queued jobs, while '''<code>atrm</code>''' removes jobs from the queue: <syntaxhighlight lang="console"> $ atq 1234 2011-08-12 11:45 cc -o foo foo.c user $ atrm 1234 $ atq $ </syntaxhighlight> In some Unix-like computer [[operating system]]s, it uses a [[Daemon (computing)|daemon]], '''<code>atd</code>''', which waits in the background periodically checking the list of jobs to do and executing those at their scheduled time on behalf of '''<code>at</code>'''.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)