IRegisteredTask interface (taskschd.h)

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.

Inheritance

The IRegisteredTask interface inherits from the IUnknown interface. IRegisteredTask also has these types of members:

Methods

The IRegisteredTask interface has these methods.

 
IRegisteredTask::get_Definition

Gets the definition of the task.
IRegisteredTask::get_Enabled

Gets or sets a Boolean value that indicates if the registered task is enabled. (Get)
IRegisteredTask::get_LastRunTime

Gets the time the registered task was last run.
IRegisteredTask::get_LastTaskResult

Gets the results that were returned the last time the registered task was run.
IRegisteredTask::get_Name

Gets the name of the registered task.
IRegisteredTask::get_NextRunTime

Gets the time when the registered task is next scheduled to run.
IRegisteredTask::get_NumberOfMissedRuns

Gets the number of times the registered task has missed a scheduled run.
IRegisteredTask::get_Path

Gets the path to where the registered task is stored.
IRegisteredTask::get_State

Gets the operational state of the registered task.
IRegisteredTask::get_Xml

Gets the XML-formatted registration information for the registered task.
IRegisteredTask::GetInstances

Returns all instances of the currently running registered task.
IRegisteredTask::GetRunTimes

Gets the times that the registered task is scheduled to run during a specified time.
IRegisteredTask::GetSecurityDescriptor

Gets the security descriptor that is used as credentials for the registered task.
IRegisteredTask::put_Enabled

Gets or sets a Boolean value that indicates if the registered task is enabled. (Put)
IRegisteredTask::Run

Runs the registered task immediately.
IRegisteredTask::RunEx

Runs the registered task immediately using specified flags and a session identifier.
IRegisteredTask::SetSecurityDescriptor

Sets the security descriptor that is used as credentials for the registered task.
IRegisteredTask::Stop

Stops the registered task immediately.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header taskschd.h

See also

Task Scheduler

Task Scheduler Interfaces