IScheduledWorkItem interface

[[This API may be altered or unavailable in subsequent versions of the operating system or product. Please use the Task Scheduler 2.0 Interfaces instead.] ]

Provides the methods for managing specific work items.

Methods

The IScheduledWorkItem interface has these methods.

Method Description
IScheduledWorkItem::CreateTrigger Creates a trigger for the work item.
IScheduledWorkItem::DeleteTrigger Deletes a trigger from a work item.
IScheduledWorkItem::EditWorkItem Displays the Task, Schedule, and settings property pages for the work item, allowing a user set the properties on those pages.
IScheduledWorkItem::GetAccountInformation Retrieves the account name for the work item.
IScheduledWorkItem::GetComment Retrieves the comment for the work item.
IScheduledWorkItem::GetCreator Retrieves the name of the creator of the work item.
IScheduledWorkItem::GetErrorRetryCount Retrieves the number of times that the Task Scheduler will retry an operation when an error occurs. This method is not implemented.
IScheduledWorkItem::GetErrorRetryInterval Retrieves the time interval, in minutes, between Task Scheduler's attempts to run a work item if an error occurs. This method is not implemented.
IScheduledWorkItem::GetExitCode Retrieves the last exit code returned by the executable associated with the work item on its last run. The method also returns the exit code returned to Task Scheduler when it last attempted to run the work item.
IScheduledWorkItem::GetFlags Retrieves the flags that modify the behavior of any type of work item.
IScheduledWorkItem::GetIdleWait Retrieves the idle wait time for the work item.
IScheduledWorkItem::GetMostRecentRunTime Retrieves the most recent time the work item began running.
IScheduledWorkItem::GetNextRunTime Retrieves the next time the work item will run.
IScheduledWorkItem::GetRunTimes Retrieves the work item run times for a specified time period.
IScheduledWorkItem::GetStatus Retrieves the status of the work item.
IScheduledWorkItem::GetTrigger Retrieves a task trigger.
IScheduledWorkItem::GetTriggerCount Retrieves the number of triggers for the current work item.
IScheduledWorkItem::GetTriggerString Retrieves a string that describes the work item trigger.
IScheduledWorkItem::GetWorkItemData Retrieves application-defined data associated with the work item.
IScheduledWorkItem::Run Sends a request to the Task Scheduler service to run the work item.
IScheduledWorkItem::SetAccountInformation Sets the account name and password used to run the work item.
IScheduledWorkItem::SetComment Sets the comment for the work item.
IScheduledWorkItem::SetCreator Sets the name of the work item's creator.
IScheduledWorkItem::SetErrorRetryCount Sets the number of times Task Scheduler will try to run the work item again if an error occurs. This method is not implemented.
IScheduledWorkItem::SetErrorRetryInterval Sets the time interval, in minutes, between Task Scheduler's attempts to run a work item after an error occurs. This method is not implemented.
IScheduledWorkItem::SetFlags Sets the flags that modify the behavior of any type of work item.
IScheduledWorkItem::SetIdleWait Sets the minutes that the system must be idle before the work item can run.
IScheduledWorkItem::SetWorkItemData This method stores application-defined data associated with the work item.
IScheduledWorkItem::Terminate This method ends the execution of the work item.

Remarks

The IScheduledWorkItem interface is the base interface for the ITask interface. All methods provided by IScheduledWorkItem are inherited by the ITask interface and are typically called through that interface.

Examples

For more information and example code for this interface, see C/C++ Code Example: Terminating a Task.

Requirements

   
Windows version Windows 2000 Professional [desktop apps only] Windows 2000 Server [desktop apps only]
Target Platform Windows
Header mstask.h

See Also

ITask