IRegisteredTask interface

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 IRegisteredTask interface inherits from the IUnknown interface. IRegisteredTask also has these types of members:

Methods

The IRegisteredTask interface has these methods.

MethodDescription
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 IRegisteredTask interface has these properties.

PropertyAccess typeDescription

Definition

Read-only

Gets the definition of the task.

Enabled

Read/write

Gets or sets 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 interface, see Time Trigger Example (C++) and Displaying Task Names and States (C++).

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Taskschd.h

Library

Taskschd.lib

DLL

Taskschd.dll

See also

Task Scheduler Interfaces
Task Scheduler

 

 

Community Additions

ADD
Show:
© 2014 Microsoft