Running Programs on Schedule

[Previous] [Next]

Windows 2000's Scheduled Tasks is an ideal way to set up routine maintenance and other chores that need to be handled at scheduled intervals. You can set up any number of programs or scripts to run at scheduled times, and your scheduling options are extremely flexible.

Scheduled Tasks provides a user-friendly alternative to the At command, which must be run in a Command Prompt window. If you're accustomed to using At, you can continue to do so, and tasks scheduled via At will appear in the Scheduled Tasks folder. Unlike At, however, Scheduled Tasks lets you assign multiple schedules to single tasks.

To set up a scheduled task:

  1. From the Start menu, choose Programs, Accessories, System Tools, Scheduled Tasks.

TIP
Alternatively, you can open the Scheduled Tasks folder from Control Panel.

  1. In the Scheduled Tasks folder, click Add Scheduled Task.
  2. Complete the dialog boxes presented by the Scheduled Task Wizard.

Figure 14-3 shows the dialog box you'll see if you choose to schedule your task monthly. Here the task has been set up to run at 5:40 P.M. on the third Thursday of every other month. A comparable range of options is available for daily and weekly schedules.

click to view at full size.

Figure 14-3. Scheduled Tasks can accommodate most scheduling needs. Here a task is being set up to run on the third Thursday of alternate months.

In addition to calendar-based scheduling, you can set up tasks to run only when your computer is turned on (regardless of who logs on) and only when you log on under the current account. Scheduling a task using the latter option is equivalent to putting a shortcut for the task on your Startup menu.

Setting Up Advanced Scheduling Options

Near the end of the sequence of pages presented by the Scheduled Task Wizard, a check box appears asking whether you want to open advanced properties for the task you're setting up. If you don't choose this option when you create the task schedule, you can go to it at any time by opening the Scheduled Tasks folder, right-clicking the task name in the list, and then choosing Properties from the shortcut menu. However you get there, the properties dialog box presents scheduling options that don't appear in the wizard. Figure 14-4 shows some of those options.

On the Schedule tab shown in the figure, you can modify the current schedule. You can also set up a multiple schedule. If you select the Show Multiple Schedules check box, the dialog box expands to accept additional scheduling parameters. You could, for example, arrange to have your task run every Friday at 5 P.M. and also at 5 P.M. on the thirtieth day of every month.

click to view at full size.

Figure 14-4. In the task's properties dialog box, which you can access by right-clicking the task in the Scheduled Tasks folder, you can modify the current schedule or set up multiple schedules.

Clicking the Advanced button in the dialog box shown in Figure 14-4 takes you to the Advanced Schedule Options dialog box shown in Figure 14-5. Here you can set up an end date for your task as well as specify repeat parameters. You could, for example, stipulate that your task repeat every thirty minutes between the hours of 5 P.M. and 10 P.M., or run continuously for three-and-a-half hours.

Figure 14-5. Clicking the Advanced button in Figure 14-4 takes you to this dialog box, in which you can set up repeat parameters and an end date.

The Settings tab of the scheduled task's properties dialog box, shown in Figure 14-6, provides additional control. Here you can provide a termination order for a task that has run too long, stipulate that a task not run if the computer is in use at the appointed hour (or stop running if someone begins using the computer), and tell the system not to run a task if the computer is running on battery power.

click to view at full size.

Figure 14-6. On the Settings tab, you can control what happens if the computer is in use or running on batteries when a task is scheduled to run.

Monitoring Scheduled Tasks

The Scheduled Tasks folder provides a way to keep track of your scheduled tasks. If you display the folder in Details view, you can see when each task is next scheduled to run, when it last ran, what the task's current status is, whether its last run was successful, and who created the scheduled task.



Running Microsoft Windows 2000 Professional
Running Microsoft Windows 2000 Professional
ISBN: 1572318384
EAN: 2147483647
Year: 2000
Pages: 317

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net