RegisteredTask object
Scripting object that provides the methods that are used to run the task immediately, get any running instances of the task, get or set the credentials that are used to register the task, and the properties that describe the task.
Members
The RegisteredTask object has these types of members:
Methods
The RegisteredTask object has these methods.
Method | Description |
---|---|
GetInstances | Returns all instances of the registered task that are currently running. |
GetRunTimes | Gets the times that the registered task is scheduled to run during a specified time. |
GetSecurityDescriptor | Gets the security descriptor that is used as credentials for the registered task. |
Run | Runs the registered task immediately. |
RunEx | Runs the registered task immediately using specified flags and a session identifier. |
SetSecurityDescriptor | Sets the security descriptor that is used as credentials for the registered task. |
Stop | Stops the registered task immediately. |
Properties
The RegisteredTask object has these properties.
Property | Access type | Description |
---|---|---|
Definition |
Read-only |
Gets the definition of the task. |
Enabled |
Read/write |
Gets or set a Boolean value that indicates if the registered task is enabled. |
LastRunTime |
Read-only |
Gets the time the registered task was last run. |
LastTaskResult |
Read-only |
Gets the results that were returned the last time the registered task was run. |
Name |
Read-only |
Gets the name of the registered task. |
NextRunTime |
Read-only |
Gets the time when the registered task is next scheduled to run. |
NumberOfMissedRuns |
Read-only |
Gets the number of times the registered task has missed a scheduled run. |
Path |
Read-only |
Gets the path to where the registered task is stored. |
State |
Read-only |
Gets the operational state of the registered task. |
XML |
Read-only |
Gets the XML-formatted registration information for the registered task. |
Examples
For more information and example code for this scripting object, see Time Trigger Example (Scripting) and Displaying Task Names and States (Scripting).
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows Vista [desktop apps only] |
Minimum supported server |
Windows Server 2008 [desktop apps only] |
Type library |
|
DLL |
|