At (command)

Task scheduling shell command

This article is about the task scheduling command. For the modem command language, see Hayes command set.

The ReactOS `at` command

Developer(s)| Thomas Koenig, Microsoft, ReactOS Contributors
Written in| Unix-like, ReactOS: C
Operating system| Unix-like, Windows, ReactOS
Type| Command
License| Windows: Proprietary software
ReactOS: GPLv2

`at` is a shell command for scheduling commands to be executed at a future time; once. The command was developed for Unix and is available on Unix and Unix-like systems, Windows,[1] and ReactOS.[2]

## Variants

[edit]

### Unix-like

[edit]

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 variables set as when it was scheduled. It differs from `cron`, 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.[3]

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

#### Examples

[edit]

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

$ 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 systems, 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

[edit]

In addition to the graphical user interface 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`). It is available since Windows NT, 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.[4] `at` cannot access tasks created or modified by Control Panel or `schtasks.exe`.[5] Also, tasks created with `at` are not interactive by default; interactivity needs to be explicitly requested.[6]

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

#### Examples

[edit]

To use `at`, 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]

`\\ 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

[edit]

* cron, runs scheduled tasks at regular intervals
* Launchd, Apple’s init software which handles at in macOS
* List of POSIX commands
* schtasks (Microsoft command shell)[7]
* systemd, incorporates atd

## References

[edit]

1. ^ at | Microsoft Docs
2. ^ a b reactos/at.c at master · reactos/reactos · GitHub
3. ^ "At(1) - Linux man page".
4. ^ "At". Microsoft TechNet. Microsoft. Retrieved 18 May 2014.
5. ^ "How To Use the AT Command to Schedule Tasks". Support. Microsoft. 30 October 2006.
6. ^ "Applications Started with AT Are Not Interactive". Support. Microsoft. 20 February 2007. Archived from the original on October 29, 2004.
7. ^ "Schtasks.exe". March 12, 2023. Retrieved May 25, 2025.

## Further reading

[edit]

* Barrett, Daniel J. (2012). Macintosh Terminal Pocket Guide: Take Command of Your Mac. O'Reilly. ISBN 978-1449328986.
* John Paul Mueller (2007). Windows Administration at the Command Line for Windows Vista, Windows 2003, Windows XP, and Windows 2000. John Wiley & Sons. ISBN 978-0470165799.

## External links

[edit]

Wikibooks has a book on the topic of: Guide to Windows Commands

The Wikibook Guide to Unix has a page on the topic of: Commands

* `at`: execute commands at a later time – Shell and Utilities Reference, The Single UNIX Specification, Version 5 from The Open Group
* `batch`: schedule commands to be executed in a batch queue – Shell and Utilities Reference, The Single UNIX Specification, Version 5 from The Open Group

* v
* t
* e

Unix command-line interface programs and shell builtins

File system|

* cat
* chattr
* chmod
* chown
* chgrp
* cksum
* cmp
* cp
* dd
* du
* df
* file
* fuser
* ln
* ls
* mkdir
* mv
* pax
* pwd
* rm
* rmdir
* split
* tee
* touch
* type
* umask

Processes|

* at
* bg
* crontab
* fg
* kill
* nice
* ps
* time

User environment|

* env
* exit
* logname
* mesg
* talk
* tput
* uname
* who
* write

Text processing|

* awk
* basename
* comm
* csplit
* cut
* diff
* dirname
* ed
* ex
* fold
* head
* iconv
* join
* m4
* more
* nl
* paste
* patch
* printf
* read
* sed
* sort
* strings
* tail
* tr
* troff
* uniq
* vi
* wc
* xargs

Shell builtins|

* alias
* cd
* echo
* test
* unset
* wait

Searching|

* find
* grep

Documentation|

* man

Software development|

* ar
* ctags
* lex
* make
* nm
* strip
* yacc

Miscellaneous|

* bc
* cal
* expr
* lp
* od
* sleep
* true and false

* Categories
* Standard Unix programs
* Unix SUS2008 utilities
* List

* v
* t
* e

Windows command-line programs and shell builtins

Ecosystem|

| Interpreters|

* COMMAND.COM
* Command Prompt
* PowerShell
* Recovery Console

|

Terminals|

* Windows Console
* Windows Terminal

File system navigation|

* cd (chdir)
* dir
* popd
* pushd
* tree

File management|

* attrib
* cacls
* cipher
* compact
* copy
* del (erase)
* deltree
* icacls
* mkdir (md)
* mklink
* move
* openfiles
* recover
* ren (rename)
* replace
* rmdir (rd)
* robocopy
* takeown
* xcopy

Archiving|

* expand
* extrac32
* extract
* makecab
* pax
* tar

Disk management|

* chkdsk
* convert
* defrag
* diskcomp
* diskcopy
* diskpart
* diskraid
* diskshadow
* drvspace
* fdisk
* format
* fsutil
* label
* manage-bde
* MSCDEX
* refsutil
* subst
* scandisk
* sys
* vol
* vssadmin

Processes|

* at
* exit
* kill
* runas
* sc
* schtasks
* shutdown
* start
* taskkill
* tasklist

Registry|

* assoc
* ftype
* reg
* regini
* regsvr32

User environment|

* chcp
* cmdkey
* date
* graftabl
* mode
* path
* set
* setver
* setx
* time
* title
* ver
* where
* whoami

File contents|

* comp
* edit
* edlin
* fc
* find
* findstr
* print
* type

Scripting|

* choice
* clip
* cscript
* doskey
* echo
* for
* forfiles
* goto
* if
* more
* pause
* prompt
* rem
* timeout

Networking|

* arp
* bitsadmin
* curl
* getmac
* hostname
* ipconfig
* nbtstat
* net
* netsh
* netstat
* nslookup
* PathPing
* ping
* rpcping
* route
* scp
* setspn
* sftp
* ssh
* ssh-add
* ssh-agent
* ssh-keygen
* ssh-keyscan
* tracert
* winrm
* winrs

Maintenance and care|

* auditpol
* dism
* dispdiag
* driverquery
* eventcreate
* eventtriggers
* gpresult
* gpupdate
* logman
* mofcomp
* msiexec
* ntbackup
* pentnt
* pnpunattend
* pnputil
* REAgentC
* relog
* sfc
* sxstrace
* systeminfo
* tpmtool
* tpmvscmgr
* tracerpt
* typeperf
* w32tm
* WBAdmin
* wecutil
* wevtutil
* winmgmt
* winsat
* wmic

Boot management|

* bcdedit
* bootcfg
* bootsect
* fixboot
* fixmbr

Software development|

* break
* debug
* exe2bin
* QBasic
* wsl

Miscellaneous|

* cls
* dpath
* help

* List of DOS commands
* Environment variables
* Windows Support Tools

*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template