Lesson 5: Using Scheduled Tasks

Lesson 5:?Using Scheduled Tasks

Use Scheduled Tasks to identify programs and batch files you want to run once, at regular intervals, or at specific times. You can schedule any script, program, or document to start at a specified time and interval or when certain operating system events occur. This feature can complete many administrative tasks for you.


After this lesson, you will be able to

  • Use Scheduled Tasks

Estimated lesson time: 25 minutes


Introducing Scheduled Tasks

Windows XP Professional saves scheduled tasks in the Scheduled Tasks folder, which can be accessed through the Control Panel under Performance And Maintenance. In addition, you can access Scheduled Tasks on another computer by browsing that computer's resources using My Network Places. This allows you to move tasks from one computer to another. For example, you can create task files for maintenance and then add them to a user's computer as needed.

Use Scheduled Tasks to perform the following tasks:

  • Run maintenance programs at specific intervals
  • Run programs when there is less demand for computer resources

Configuring Options

Use the Scheduled Task Wizard to schedule tasks. You access the wizard in the Scheduled Tasks folder by double-clicking Add Scheduled Task. Table 15.6 describes the options that you can configure in the Scheduled Task Wizard.

Table 15.6??Scheduled Task Wizard Options

Setting Advanced Properties

In addition to the options that are available in the Scheduled Task Wizard, you can set several additional options for tasks. You can change options that you set with the Scheduled Task Wizard or set additional advanced options by configuring advanced properties for the task.

Table 15.7 describes the tabs in the Advanced Properties dialog box for the scheduled task.

Table 15.7??Scheduled Task Wizard Advanced Options

Troubleshooting Scheduled Tasks

In general, troubleshooting the Scheduled Tasks involves checking the parameters that you have set up. However, the Advanced menu provides a few options to help you with troubleshooting. When you open Scheduled Tasks and click Advanced, the first option on the Advanced menu allows you to stop and start the Task Scheduler Service, and the selection is either Stop Using The Task Scheduler or Start Using The Task Scheduler. If your scheduled tasks are not starting, you can check this option to be sure that the Task Scheduler Service is running and if it is not, you can start it. The second option is similar to the first, only it pauses and continues the service. If the service is paused, scheduled tasks do not start.

The third option on the Advanced menu is Notify Me Of Missed Tasks. This option causes the system to send you a message when a scheduled task does not occur. The next option on the Advanced menu is the AT Service Account, which allows you to change the account being used from the System account. The final option, View Log, allows you to view a log of when the Task Scheduler Service started, stopped, paused, and continued. It also logs the name of each scheduled task, the application or task that started, and the time and date the task was started.

Practice:?Using Task Scheduler

In this practice, you schedule Address Book to start at a predetermined time. You can use this as a reminder to review address information. You also configure Task Scheduler options.

Run the TaskScheduler file in the Demos folder on the CD-ROM accompanying this book for a demonstration of using Task Scheduler.

To schedule a task to start automatically

  1. Click Start, click Control Panel, click Performance And Maintenance, and then click Scheduled Tasks.

    Windows XP Professional opens the Scheduled Tasks folder.

  2. Double-click Add Scheduled Task.

    The Scheduled Task Wizard appears.

  3. Click Next.

    Windows XP Professional displays a list of currently installed programs. To schedule a program that is not registered with Windows XP Professional, click Browse to locate the program.

  4. Click Browse.

    Windows XP Professional displays the Select Program To Schedule page.

  5. Double-click Program Files, and then double-click Windows NT.
  6. Double-click Accessories, and then double-click WordPad.
  7. Type Launch WordPad in the Type A Name For This Task text box.

    The Type A Name For This Task text box allows you to enter a description that is more intuitive than the program name. Windows XP Professional displays this name in the Scheduled Tasks folder when you finish the wizard.

  8. Click One Time Only, and then click Next.
  9. In the Start Time box, set the time to 4 minutes after the current system time and make a note of this time.

    To confirm the current system time, look at the Windows taskbar. Do not change the entry in the Start Date text box.

  10. Click Next.

    The wizard requires you to enter the name and password of a user account. When Task Scheduler runs the scheduled task, the program receives all of the rights and permissions of the user account that you enter here. The program is also bound by any restrictions on the user account. Notice that the user name you are currently using is already filled in as the default. You must type the correct password for the user account in both password boxes before you can continue.

    You will schedule the console to run with your administrative privileges.

  11. In both the Enter The Password text box and the Confirm Password text box, type password.
  12. Click Next.

    Do not select the Open Advanced Properties For This Task When I Click Finish check box. You will review the Advanced properties in the next procedure.

  13. Click Finish.

    Notice that the wizard added the task to the list of scheduled tasks.

  14. To confirm that you scheduled the task successfully, wait for the time that you configured in step 9 and WordPad will start.
  15. Close WordPad.

To configure advanced Task Scheduler options

  1. In the Scheduled Tasks folder, double-click Launch WordPad.

    Windows XP Professional displays the Launch WordPad dialog box. Notice the tabs and review the options in the tabs. These are the same options that are available if you select the check box for setting advanced options on the last page of the Scheduled Task Wizard. Do not change any of the settings.

  2. Click the Settings tab.
  3. Select the Delete The Task If It Is Not Scheduled To Run Again check box.
  4. Click the Schedule tab, and then set the start time for 2 minutes after the current system time.

    Make a note of this time.

  5. Click OK.

    To confirm that you scheduled the task successfully, wait for the time that you set in step 4 of this procedure. WordPad will start.

  6. Close WordPad.

    Notice that the scheduled event is no longer in the Scheduled Tasks folder. The option of automatically deleting a task after it finishes is useful for cleaning up after tasks that only need to run once.

  7. Close the Scheduled Tasks folder.
  8. Log off Windows XP Professional.

Lesson Review

The following questions will help you determine whether you have learned enough to move on to the next lesson. If you have difficulty answering these questions, review the material in this lesson before beginning the next lesson. The answers are in Appendix A, "Questions and Answers."

  1. How can Scheduled Tasks help you monitor, manage, and maintain network resources?
  2. Which of the following are valid choices for the frequency with which Scheduled Tasks schedules programs to run? (Choose all answers that are correct.)
    1. Daily
    2. One time only
    3. When the computer shuts down
    4. When a user logs off
  3. Why do you have to assign a user account and password for each task that you schedule using the Scheduled Task Wizard?
  4. If none of your scheduled tasks are starting, what is one thing that you need to check?

Lesson Summary

  • You can use Scheduled Tasks to schedule programs and batch files to run once, at regular intervals, at specific times, or when certain operating system events occur.
  • Windows XP Professional saves scheduled tasks in the Scheduled Tasks folder, which can be accessed through Performance and Maintenance in Control Panel.
  • After you have scheduled a task to run, you can still modify any of the options or advanced features for the task, including the program to be run.
  • You can access Scheduled Tasks on another computer by browsing that computer's resources using My Network Places, so you can move tasks from one computer to another.