Scheduling tasks with AT.exe on Windows 2003 Server
Posted on 26 November 2007 by admin
A dinasour from the Unix world, the AT command still lingers on in the Windows Server world. The AT command was available in Windows NT and Windows 2000, and it is still available inWindows
Server 2003. Obviously, you can use it to schedule tasks.
On Windows server, when you schedule a task via the
AT command, that task will appear in the Scheduled Tasks window, making it easier for those not familiar with AT to still use it. You can change the settings of the
task using the switches available in the AT command, or use the features in Scheduled
Tasks to modify the configuration of that task.
Be warned, however, that once you use Scheduled Tasks to change the configuration, the AT
modifiers will no longer work on that task. This means that you have converted the AT task to a Scheduled Tasks fromat and AT will not be able to change it in any way.
Syntax for AT.exe is the follwoing:
at [\ComputerName] [{[ID] [/delete] | /delete [/yes]}]
at [[\ComputerName] hours:minutes [/interactive] [{/every:date[,...]|/next:date[,...]}] command]
AT options are described below:
- \ComputerName specifies a remote computer (For the local computer, omit this option).
- ID is the identification number assigned to an existing command that had been scheduled.
- /delete cancels a scheduled command. Be careful, if you omit the command’s ID, all scheduled commands on the specified computer will be canceled.
- /yes provides the answer Yes to confirmation queries when you delete scheduled events.
- hours:minutes is the time when you want to run the command, using 24-hour notation.
- /interactive permits command to interact with the desktop of the user who is logged on when command runs.
- /every: runs command on every specified day or days of the week or month.
- date specifies the date that youwant to run the command. Specify one or more days of the week (M,T,W,Th,F,S,Su) or one or more days of the month (1 through 31). Separate multiple date entries with commas. If you omit date, the program uses the current day of the month.
- /next: runs command on the next occurrence of the day.
- command is the program or batch program you want to run. If the command requires a path as an argument, use the absolute path. If the command is on a remote computer, use a UNC rather than a mapped drive letter.
Entering at without parameters displays the information about the commands you’ve scheduled with the AT.exe program. This display will not include scheduled tasks, which were created in the Scheduled Tasks GUI, and it will not include scheduled tasks that were created with AT.exe but later modified in the Scheduled Tasks GUI.
Entering at \ComputerName performs the same action on a remote computer.
Tags | Microsoft, Servers, Windows XP
