• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Schedules commands and programs to run on a computer at a specified time and date.

To Open

Command Prompt at


at [\\computer] time [/interactive] [/every:date] "command"
at [\\computer] [id] [/delete] [/yes]


At is the command-line interface to the Scheduled Tasks feature, discussed later in this chapter. Given the somewhat tedious wizard interface used to create new tasks in the Scheduled Tasks window, At is a refreshing and user-friendly alternative.

To use At, you can simply type something like:

at 11:15 /interactive notepad

which would instruct Windows XP to launch Notepad at 11:15 AM today. When you enter the command and press Enter, At responds with something like:

Added a new job with job ID = 1

and a corresponding entry appears in the Scheduled Tasks window. The ID is used only to subsequently delete tasks with At (using the second Usage, shown above), like this:

at 1 /delete

The following options extend the usefulness of At:

\\ computer

Specify the name of a remote computer on the network to add the new task to that computer's scheduled tasks list, rather than that of the local computer.


The time of day to run the task, specified in 24-hour (military) time. Type 5:20 for 5:20 in the morning, 17:20 for 5:20 in the afternoon, 12:00 for noon, and 0:00 for midnight.


If you omit the /interactive option, the task will be run invisibly in the background. For example, if you were to launch Notepad with the example above without specifying /interactive, there would be no visible evidence that Notepad is running, except for its listing in the processes tab of the Task Manager (discussed later in this chapter). You may want to run an application in the background if you do not want to interfere with any foreground applications. Use caution when starting background processes, however, since you won't be able to interact with them at all, other than closing them with Task Manager.

/every: date, /next: date

By default, At creates one-time tasks, executed only on the date when they were created; if you were to type the example above at 4:00 in the afternoon, for example, the task would never run. To specify the day or a range of days, use the /every or /next options.

For example, to run Disk Defragmenter at 11:15 PM every Thursday, type:

	at 23:15 /every:thursday dfrg.msc

To run Disk Defragmenter at 11:15 AM on the 21st day of every month, type:

	at 11:15 /every:21 dfrg.msc

To specify multiple days, separate them with commas. To run Solitaire at 3:45 in the afternoon (note the mandatory use of 24-hour time) on both Tuesdays and Thursdays, type:

	at 15:45 /interactive /every:tuesday,thursday sol

The /next option works similarly, although /every and /next should not be used together. To run Chkdsk at 6:33 PM next Saturday, type:

	at 18:33 /next:saturday chkdsk


Use /delete to remove one or all tasks. Specify the task ID (described earlier in this section) to end that task, or omit the ID to delete all tasks. If you try to delete all tasks, At will ask you to confirm; use the optional /yes option to bypass the prompt. Only tasks originally created with At can be deleted in this way; all other tasks will be left alone.


Include /yes to bypass the prompt that appears when you try to delete all tasks.


  • The Schedule service must be running to use At. To see if it is running, open the Scheduled Tasks window and select the Advanced menu. If the first menu item is "Stop using Task Scheduler," the service is active; click the item to turn the service off. Conversely, click "Start using Task Scheduler" to turn the service back on.

  • To choose the user account under which tasks created with the At command are run, open the Scheduled Tasks window and select At Service Account from the Advanced menu.

  • The Scheduled Tasks Console, discussed later in this chapter, is intended to replace At. Although the Scheduled Tasks Console is a little more full featured, At is much easier to use.

See Also

Scheduled Tasks

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint