Szerkesztés

Megosztás a következőn keresztül:


Priority (settingsType) Element

Specifies the priority level for the task.

<xs:element name="Priority"
    type="priorityType"
    default="7"
    minOccurs="0"
 />

The Priority element is defined by the settingsType complex type.

Parent element

Element Derived from Description
Settings settingsType Contains the settings that the Task Scheduler uses to perform the task.

Remarks

Priority level 0 is the highest priority, and priority level 10 is the lowest priority. The default value is 7. The minimum and maximum values are set by the priorityType simple type. Priority levels 7 and 8 are used for background tasks, and priority levels 4, 5, and 6 are used for interactive tasks.

The task's action is started in a process with a priority that is based on a Priority Class value. A Priority Level value (thread priority) is used for COM handler, message box, and email task actions. For more information about the Priority Class and Priority Level values, see Scheduling Priorities; for more information about I/O Priority values, see IO_PRIORITY_HINT enumeration; for information about Memory Priority values, see MEMORY_PRIORITY_INFORMATION structure. The following table lists the possible values for the Priority element, and the corresponding Priority Class, Priority Level, I/O Priority and Memory Priority values.

Task Priority Priority Class Priority Level I/O Priority Memory Priority
0 REALTIME_PRIORITY_CLASS THREAD_PRIORITY_TIME_CRITICAL IoPriorityNormal MEMORY_PRIORITY_NORMAL
1 HIGH_PRIORITY_CLASS THREAD_PRIORITY_HIGHEST IoPriorityNormal MEMORY_PRIORITY_NORMAL
2 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL IoPriorityNormal MEMORY_PRIORITY_NORMAL
3 ABOVE_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_ABOVE_NORMAL IoPriorityNormal MEMORY_PRIORITY_NORMAL
4 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL IoPriorityNormal MEMORY_PRIORITY_NORMAL
5 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL IoPriorityNormal MEMORY_PRIORITY_BELOW_NORMAL
6 NORMAL_PRIORITY_CLASS THREAD_PRIORITY_NORMAL IoPriorityNormal MEMORY_PRIORITY_MEDIUM
7 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL IoPriorityLow MEMORY_PRIORITY_LOW
8 BELOW_NORMAL_PRIORITY_CLASS THREAD_PRIORITY_BELOW_NORMAL IoPriorityLow MEMORY_PRIORITY_VERY_LOW
9 IDLE_PRIORITY_CLASS THREAD_PRIORITY_LOWEST IoPriorityVeryLow MEMORY_PRIORITY_VERY_LOW
10 IDLE_PRIORITY_CLASS THREAD_PRIORITY_IDLE IoPriorityVeryLow MEMORY_PRIORITY_VERY_LOW

For C++ development, see Priority Property of ITaskSettings.

For script development, see TaskSettings.Priority.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]

See also

Task Scheduler Schema Elements