Windows Administration Codexery

At (command)

At is a shell command for scheduling commands to be executed once at a future time. It was originally developed for use with Unix and is now available on a variety of Unix-like systems, as well as Windows and ReactOS.

Quick Facts

Developer
  • Thomas Koenig
  • Microsoft
  • ReactOS Contributors
Programming language
Unix-like, ReactOS: C
Operating system
  • Unix-like
  • Windows
  • ReactOS
Genre
Command
License
Windows: Proprietary software; ReactOS: GPLv2

Facts from the source article.

Variants

The at command on Unix-like systems takes commands from standard input and bundles them into a single "at-job" that runs at a user-specified date and time. The job inherits the current environment, meaning it runs in the same working directory and with the same environment variables that were set when the job was scheduled. This differs from cron, which is designed for recurring tasks like running every hour, every Tuesday, or on January 1 each year. System administrators can restrict who can use at on many Unix systems. The command can send an email to the user after a job finishes, supports multiple job queues, and can read commands from a file instead of standard input. Thomas Koenig wrote most of the Linux version of at. There is also a batch command that only runs scheduled jobs when the system's load average falls below a certain threshold.

A typical example compiles a C program at 11:45 a.m. on January 31. You can do this with echo "cc -o foo foo.c" | at 1145 jan 31 or by entering at 1145 jan 31, typing the command, and pressing Control-D at the start of a line. The atq program lists queued jobs, and atrm removes them. For instance, atq might show 1234 2011-08-12 11:45 cc -o foo foo.c user, and atrm 1234 would delete it. On some Unix-like systems, a background daemon called atd periodically checks the job list and executes tasks at their scheduled times.

On Windows, the at shell command schedules operations to run at a specific time and date, similar to cron. It has been available since Windows NT but is now deprecated in favor of schtasks. It only works when the Schedule service is running, and listing scheduled commands is done by using at without parameters. Tasks created with at cannot be accessed by Control Panel or schtasks.exe, and they are not interactive by default—interactivity must be explicitly requested. The ReactOS implementation is based on Windows, was developed by Eric Kohl, and is licensed under GPLv2. To use at, the user must belong to the local Administrators group. The command syntax is at [\\ComputerName] [{[ID] [/delete]|/delete [/yes]}] and at [[\\ComputerName] hours:minutes [/interactive] [{/every:date[,...]|/next:date[,...]}] command].

More in Windows Administration

Spotted an error? Know more?

Reader corrections go straight into our review queue. Suggest an edit · How this site is sourced

Comments

Loading…
Open in the interactive codex →