Редагувати

Поділитися через


TaskSettings.MultipleInstances property

For scripting, gets or sets the policy that defines how the Task Scheduler deals with multiple instances of the task.

This property is read/write.

Syntax

TaskSettings.MultipleInstances As Integer

Property value

TASK_INSTANCES_POLICY constants.

Value Meaning
TASK_INSTANCES_PARALLEL
0
Starts a new instance while an existing instance of the task is running.
TASK_INSTANCES_QUEUE
1
Starts a new instance of the task after all other instances of the task are complete.
TASK_INSTANCES_IGNORE_NEW
2
Does not start a new instance if an existing instance of the task is running.
TASK_INSTANCES_STOP_EXISTING
3
Stops an existing instance of the task before it starts new instance.

Remarks

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

Requirements

Requirement Value
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

TASK_INSTANCES_POLICY

Task Scheduler