• Aucun résultat trouvé

Configuring, Managing, and Troubleshooting Scheduled Tasks

Dans le document Windows XP Professional (Page 149-153)

Windows XP Professional includes a Task Scheduler utility that allows you to schedule tasks to occur at specified intervals. You can set any of your Windows programs to run automatically at a specific time and at a set interval, such as daily, weekly, or monthly. For example, you might schedule your Windows Backup program to run daily at 2:00 a.m.

T A B L E 4 . 2 Options for the start Command-Line Utility

Option Description

/low Starts an application in the idle priority class.

/normal Starts an application in the Normal priority class.

/high Starts an application in the High priority class.

/realtime Starts an application in the Realtime priority class.

/abovenormal Starts an application in the Abovenormal priority class.

/belownormal Starts an application in the Belownormal priority class.

/min Starts the application in a minimized window.

/max Starts the application in a maximized window.

/separate Starts a Windows 16-bit application in a separate memory space. By default, Windows 16-bit applications run in a shared memory space—

an NTVDM, or NT Virtual DOS Machine.

/shared Starts a DOS or Windows 16-bit application in a shared memory space.

The following steps are used to create a scheduled task:

1. Select Start Control Panel Performance and Maintenance, and select Scheduled Tasks.

2. In the Scheduled Tasks window, double-click the Add Scheduled Task icon.

3. When the first page of the Scheduled Task Wizard appears, click the Next button to continue.

4. The first Scheduled Task Wizard dialog box lists applications you can run. You can select an application from the list or click the Browse button to locate any application or program to which your computer has access. After you select an application, click the Next button.

5. The next wizard dialog box prompts you to select a name for the task and specify when it will be performed. Make your selection and click the Next button.

6. Depending on the selection you made for the task’s schedule, you may see another dialog box for setting the specific schedule. For example, if you chose to run the task weekly, the next dia-log box lets you select the start time for the task, choose to run the task every x weeks, and pick the day of the week that the task should be run. Make your selection and click the Next button.

7. Next, you are prompted to enter the username and the password that will be used to start the task. After you enter this information, click the Next button.

8. The final dialog box shows your selections for the scheduled task. If this information is cor-rect, click the Finish button.

Managing Scheduled Task Properties

You can manage a scheduled task through its properties dialog box; Figure 4.6 shows the properties for the Calculator job. To access this dialog box, open the Scheduled Tasks window (Start Control Panel Performance and Maintenance, and then select Scheduled Tasks). Right-click the task you wish to manage, and choose Properties from the pop-up menu.

F I G U R E 4 . 6 The Task properties for the scheduled task

Monitoring, Optimizing, and Troubleshooting Performance 131

The scheduled task properties dialog box has three tabs, Task, Schedule, and Settings, with options for managing how and when the task is run and who can manage it. These options are described in the following sections.

TASK PROPERTIES

Through the Task tab, you can configure the following options:

The command-line program that is used to run the task

The folders containing related files that might be required to run the specified task (this is the Start In information)

Any comments that you want to include for informational purposes

The username and password to be used to run the specified task (this is the Run As information)

Whether the scheduled task is enabled SCHEDULE PROPERTIES

The Schedule tab, shown in Figure 4.7, shows the schedule configured for the task. You can change any of these options to reschedule the task.

SETTINGS PROPERTIES

The Settings tab (Figure 4.8) offers several configuration settings for the scheduled task:

The options in the Scheduled Task Completed section allow you to delete the task if it will not be run again and specify how long the task should be allowed to run before it is stopped.

F I G U R E 4 . 7 The Schedule properties for the scheduled task

The options in the Idle Time section are useful if the computer must be idle when the task is run. You can specify how long the computer must be idle before the task begins and whether the task should be stopped if the computer ceases to be idle.

The options in the Power Management section are applicable when the computer on which the task runs may be battery powered. You can specify that the task should not start if the computer is running from batteries and choose to stop the task if battery mode begins.

If you are using Task Scheduler and your jobs are not running properly, make sure that the Task Scheduler service is running and is configured to start auto-matically. You should also ensure that the user who is configured to run the scheduled task has sufficient permissions to run the task.

Troubleshooting Scheduled Tasks

If you are trying to use Scheduled Tasks and the tasks are not being executed properly, one of the following troubleshooting options may resolve the problem.

If a scheduled task does not run as expected, right-click the task and select Properties. From the Task tab, verify that the Enabled check box is selected. From the Schedule tab, verify the schedule that has been defined for the task to run.

If the scheduled task is a command-line utility, make sure that you have properly defined the command-line utility, including any options that are required for the utility to run properly.

F I G U R E 4 . 8 The Settings tab of the scheduled task dialog box

Manage, Monitor, and Optimize System Performance for Mobile Users 133

Verify that the user who is configured to run the scheduled task has the necessary permis-sions to the task that will be run.

Within the Scheduled Tasks window, check the task status within the Status column. The status types are defined as follows:

Blank, which indicates that the task is not running, or that it was run successfully

Running, which means that the task is currently being run

Missed, which specifies that one or more attempts to run the task were missed

Could not start, which indicates that the most recent attempt to start the task failed

Verify that the Scheduled Tasks service has been enabled on the computer if no tasks can be run on the computer.

If no user is logged into the computer when the task is scheduled to be run, the task will still run, but it will not be visible.

Exam Essentials

Be able to optimize memory, processor, and disk performance. Know the key counters that are used to track performance. Know when a counter indicates a bottleneck and how to resolve the bottleneck.

Know how to monitor and manage application performance. Be able to use Task Manager to monitor applications. Know how to set processor affinity. Be able to manage application pri-orities through Task Manager or the start command-line utility.

Know how to use scheduled tasks. Be able to create and troubleshoot a scheduled task.

Manage, Monitor, and Optimize System

Dans le document Windows XP Professional (Page 149-153)