Scheduling Maintenance Tasks in Windows XP Professional
System administrators who are familiar with both UNIX and previous versions of Windows XP Professional will recall the pervasive AT command that is found on both operating systems. Microsoft's focus on bringing commonly used commands into Wizards is certainly true here: The Scheduled Task Wizard in XP puts a graphical interface and greater features than the command-line AT command so pervasively used by interactively and in shell scripts before. Both the AT command and the Scheduled Task Wizard can be used for scheduling and invoking tasks on both local and remote systems. The more experienced system administrators find the AT command to be nearly second nature, whereas the wizard-based approach is easier to teach others. This article focuses on the strengths and weaknesses of each approach, and provides a refresher for system administrators who need to automate recurring tasks.
The Scheduled Task Wizard provides a point-and-click interface to task assignment, hiding the complexities and challenges of dealing with syntax issues when completing scheduled tasks. If you're an administrator dealing with many different tasks on many different computers, the wizard actually gets in the way and can be difficult to work with. It slows down how effective you can be with a command line when several systems are being monitored.
For system administrators who focus on only a few systems, the wizard makes sense. However, for administrators who work with several systems at once, the AT command (in a specific Command Prompt window) can be more effective.
The best approach of all for handling multiple tasks is to create shell scripts that can coordinate tasks across many computers at the same time. What's useful about shell scripts is that they can be moved from network to network easily, changing IP addresses so the specific systems can communicate.
Clearly, Microsoft believed that more administrators and experienced users would use the Scheduled Task Wizard instead of the command-line AT interface because of its point-and-click interface. The biggest payoff for learning the command syntax for the AT command is that you can designate a single server to be the task scheduler, making it possible to view and set all tasks throughout a network on a single server.
Both scheduling utilities use the Scheduled Task service to monitor the system clock and run tasks at specified times. The Task Scheduler service logs on as the LocalSystem account by default. This account usually doesn't have adequate permissions to perform administrative tasks. With the AT scheduler, administrators can solve this problem by setting environment variables and user settings in shell scripts. With the Task Scheduler Wizard, each task can be run as a specific user, and you can set the user name and password to use for the task when you create it. Be sure to use an account that has adequate user privileges and access rights to run the tasks you want to schedule.