How to Use the 'At' Command in Windows

Use the 'at' command to schedule commands and other programs

In Windows 7 and earlier versions of Windows, the at command is a Command Prompt command that is used to schedule other commands and programs to run at specific dates and times.

At Command Availability

The at command is available from within the Command Prompt in many Windows operating systems including Windows 7, Windows Vista, Windows XP, and some older versions of Windows as well.

Windows 7 AT command in Command Prompt

This command has been deprecated in Windows 10 and Windows 8. Microsoft recommends using the feature-rich schtasks command instead.

The availability of at command switches may differ somewhat from operating system to operating system.

At Command Syntax

This is the proper syntax of the at command:

at \\computername <time> /interactive | /every:date,.../next:date,... <command>

See How to Read Command Syntax if you're not sure how to read the at command syntax shown above or described in the table below.

At Command Options
Item Explanation
\\computername Use this option to specify a remote computer name. The at command will schedule the running of command on the local computer if you don't specify a computer name.
/every:date[,...] Use the /every switch to run command on specific days of the week or month.
/next:date[,...] Use the /next switch to run command on the next occurrence of the day.
<time> Specifies the time when the command is to run.
/interactive Allows the scheduled command to interact with whatever user is logged in when the job is run.
id This is the unique number assigned to an already scheduled command. The id option is only used for displaying or deleting a scheduled command. You cannot manually set an id to a scheduled command.
/delete [/yes] This at command option is used to delete all previously scheduled commands. Use the /yes option with /delete to skip the "delete all scheduled jobs" confirmation question. Use /delete when specifying an id to delete a single scheduled command.
<command> This specifies the command or program to run. You must enclose command in double-quotes.
/? Use the help switch with the at command to show detailed help about the command's several options.

At Command Examples

at 14:15 "chkdsk /f"

In the above example, the at command is used to schedule a run of the chkdsk command as chkdsk /f, today only, at 2:15 p.m., on the currently used PC.

at \\prodserver 23:45 /every:1,4,8,12,16,20,24,28 "bkprtn.bat"

In this example, the at command is used to schedule the execution of the bkprtn.bat batch file on the computer named prodserver at 11:45 p.m. on the first, fourth, eighth, 12th, 16th, 20th, 24th, and 28th day of each month.

at 1 /delete

Here, the scheduled command with the id of 1 is deleted.

At Related Commands

The at command is often used with many other Command Prompt commands because it's used to schedule the running of other commands.