Export (0) Print
Expand All
2 out of 2 rated this helpful - Rate this topic

TaskSettings.Priority property

For scripting, gets or sets the priority level of the task.

This property is read/write.

Syntax

TaskSettings.Priority As Integer

Property value

The priority level (0-10) of the task. The default is 7.

Remarks

Priority level 0 is the highest priority, and priority level 10 is the lowest priority. The default value is 7. 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. The following table lists the possible values for the priority parameter, and the corresponding Priority Class and Priority Level values.

Task priorityPriority ClassPriority Level
0REALTIME_PRIORITY_CLASSTHREAD_PRIORITY_TIME_CRITICAL
1HIGH_PRIORITY_CLASSTHREAD_PRIORITY_HIGHEST
2ABOVE_NORMAL_PRIORITY_CLASSTHREAD_PRIORITY_ABOVE_NORMAL
3ABOVE_NORMAL_PRIORITY_CLASSTHREAD_PRIORITY_ABOVE_NORMAL
4NORMAL_PRIORITY_CLASSTHREAD_PRIORITY_NORMAL
5NORMAL_PRIORITY_CLASSTHREAD_PRIORITY_NORMAL
6NORMAL_PRIORITY_CLASSTHREAD_PRIORITY_NORMAL
7BELOW_NORMAL_PRIORITY_CLASSTHREAD_PRIORITY_BELOW_NORMAL
8BELOW_NORMAL_PRIORITY_CLASSTHREAD_PRIORITY_BELOW_NORMAL
9IDLE_PRIORITY_CLASSTHREAD_PRIORITY_LOWEST
10IDLE_PRIORITY_CLASSTHREAD_PRIORITY_IDLE

 

When reading or writing XML for a task, this setting is specified in the Priority (settingsType) element of the Task Scheduler schema.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Type library

Taskschd.tlb

DLL

Taskschd.dll

See also

TaskSettings

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.