It's true that you could—and still can—schedule tasks using the AT command, as described later in this chapter, but Task Scheduler provides a graphical interface and is much easier to use. Tasks can be scheduled during off-hours and to run repeatedly. The Task Scheduler service is started at bootup and runs in the background. To use Task Scheduler, open Control Panel, double-click the Scheduled Tasks folder, and then follow these steps:
Figure 10-15. Selecting the program to be scheduled.
For tasks to run as expected, it's important that the computer's date and time be set correctly.
Many programs will start to run in Task Scheduler and then pause, waiting for input that never comes—or that comes much later, when someone looks at the machine to see what's going on. To make sure you have all of the parameters for a task to be able to run successfully, open a command prompt and type program_name /?. Then right-click the task in the Scheduled Tasks window and choose Properties from the shortcut menu. Enter the necessary parameters in the Run text box and click OK.
You might want to schedule a task to run right away so you can test its performance. If a task is scheduled by a user and that user isn't logged on at the scheduled time, the task still runs but is in the background and not visible.
Unfortunately the Windows 2000 disk defragmenter utility doesn't support scheduled operation (unlike the defrag program in Microsoft Windows XP and the Microsoft Windows .NET Server family). To schedule a defrag operation, you can either purchase a commercial defrag program that supports scheduling, such as Executive Software's Diskeeper, or you can write or download a script that enables the Windows disk defragmenter to be scheduled. (To find such a script, perform a Web search on "Windows 2000 disk defragmenter".)
Even the best schedule can run up against reality now and again, so you need to be able to adjust your planned events.
The system maintains a detailed log of Task Scheduler's activities. To view the log, double-click Scheduled Tasks in Control Panel. From the Advanced menu, choose View Log. This opens a log like the one shown in Figure 10-16, with the most recent entry at the bottom of the window. The Details view in the Scheduled Tasks window displays information about each task (Figure 10-17).
Figure 10-16. The Task Scheduler log.
Figure 10-17. The Details view for scheduled tasks.
If a scheduled task doesn't execute as expected, right-click the task in the Task Scheduler window and choose Properties from the shortcut menu. Verify that the task is in fact enabled. (The Enabled check box in the Task Properties window should be selected.)
If you are an administrator of a remote computer running Windows NT or Windows 2000, you can view and edit the Task Scheduler settings on that computer. Find the computer in the My Network Places window (in Windows 2000) or in the Network Neighborhood window (in Windows NT), and then double-click the Scheduled Tasks folder.
To view and edit scheduled tasks on computers running Windows 95 or later, the remote computer must