Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

at (command)

From Wikipedia, the free encyclopedia
Task scheduling shell command
This article is about the task scheduling command. For the modem command language, seeHayes command set.
at
TheReactOSat command
Developer(s)Thomas Koenig,Microsoft, ReactOS Contributors
Written inUnix-like,ReactOS:C
Operating systemUnix-like,Windows,ReactOS
TypeCommand
LicenseWindows:Proprietary software
ReactOS:GPLv2

at is ashellcommand for scheduling commands to be executed at a futuretime; once. The command was developed forUnix and is available onUnix andUnix-like systems,Windows,[1] andReactOS.[2]

Variants

[edit]

Unix-like

[edit]

On Unix-like operating systems,at reads a series of commands fromstandard 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 sameworking directory and with the sameenvironment variables set as when it was scheduled. It differs fromcron, which is used for recurring executions (e.g. once an hour, every Tuesday, January 1 every year). As withcron, many Unix systems allow the administrator to restrict access to theat command.at can be made to mail a user when done carrying out a scheduled job, can use more than onejob queue, and can read a list of jobs to carry out from afile instead of standard input. The Linuxat command was mostly written by Thomas Koenig.[3]

Thebatch command can be used instead ofat to only run scheduled jobs if the system'sload average is below a certain value.

Examples

[edit]

A sample command to compile aC program at 11:45 a.m. on January 31 would be:

$echo"cc -o foo foo.c"|at1145jan31

or

$at1145jan31at> cc -o foo foo.cat> ^D #(press Control-D while at the beginning of a line)

Theatq program lists the currently queued jobs, whileatrm removes jobs from the queue:

$atq1234 2011-08-12 11:45 cc -o foo foo.c user$atrm1234$atq$

In some Unix-like computeroperating systems, it uses adaemon,atd, which waits in the background periodically checking the list of jobs to do and executing those at their scheduled time on behalf ofat.

Windows and ReactOS

[edit]

In addition to thegraphical user interface forWindows Task Scheduler inControl Panel, Windows provides anat shell command that schedules operations to run at a specified time and date (similar tocron). It is available sinceWindows NT, but is now deprecated in favor ofschtasks. It can only be used when theSchedule service is running. When used without parameters,at lists scheduled commands.[4]at cannot access tasks created or modified by Control Panel orschtasks.exe.[5] Also, tasks created withat are not interactive by default; interactivity needs to be explicitly requested.[6]

TheReactOS implementation is based on the Windows implementation. It was developed by Eric Kohl and is licensed under theGPLv2.[2]

Examples

[edit]

To useat, 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]

References

[edit]
  1. ^at | Microsoft Docs
  2. ^abreactos/at.c at master · reactos/reactos · GitHub
  3. ^"At(1) - Linux man page".
  4. ^"At".Microsoft TechNet.Microsoft. Retrieved18 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 fromthe original on October 29, 2004.
  7. ^"Schtasks.exe". March 12, 2023. RetrievedMay 25, 2025.

Further reading

[edit]

External links

[edit]
Wikibooks has a book on the topic of:Guide to Windows Commands
The WikibookGuide to Unix has a page on the topic of:Commands
File system
Processes
User environment
Text processing
Shell builtins
Searching
Documentation
Software development
Miscellaneous
Ecosystem
Interpreters
Terminals
File system navigation
File management
Archiving
Disk management
Processes
Registry
User environment
File contents
Scripting
Networking
Maintenance and care
Boot management
Software development
Miscellaneous
Retrieved from "https://en.wikipedia.org/w/index.php?title=At_(command)&oldid=1292244669"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp