How to Use the 'At' Command in Windows

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

Man using a computer

Caiaimage / Agnieszka Olek / Getty Images

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. 

The at command is not available in Windows 10 or Windows 8. Microsoft recommends that you use the feature-rich schtasks command instead.

At Command Syntax in Windows 7 and Earlier

The syntax of the at command is:

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

The individual components of the syntax are:

  • \\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 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. It is not in Windows 8 or 10.

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

At Related Commands

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