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.

Members

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

Methods

The IScheduledWorkItem interface has these methods.

MethodDescription
CreateTrigger

Creates a trigger using a work item object.

DeleteTrigger

Deletes a trigger from a work item.

EditWorkItem

Opens the configuration properties for the work item.

GetAccountInformation

Retrieves the account name for the work item.

GetComment

Retrieves the comment for the work item.

GetCreator

Retrieves the creator of the work item.

GetErrorRetryCount

Not currently implemented.

GetErrorRetryInterval

Not currently implemented.

GetExitCode

Retrieves the work item's last exit code.

GetFlags

Retrieves the flags that modify the behavior of the work item.

GetIdleWait

Retrieves the idle wait time for the work item.

GetMostRecentRunTime

Retrieves the most recent time the work item began running.

GetNextRunTime

Retrieves the next time the work item will run.

GetRunTimes

Retrieves the work item run times for a specified time period.

GetStatus

Retrieves the status of the work item.

GetTrigger

Retrieves a trigger structure.

GetTriggerCount

Retrieves the number of triggers associated with a work item.

GetTriggerString

Retrieves a trigger string.

GetWorkItemData

Retrieves application-defined data associated with the work item.

Run

Runs the work item.

SetAccountInformation

Sets the account name and password for the work item.

SetComment

Sets the comment for the work item.

SetCreator

Sets the creator of the work item.

SetErrorRetryCount

Not currently implemented.

SetErrorRetryInterval

Not currently implemented.

SetFlags

Sets the flags that modify the behavior of the work item.

SetIdleWait

Sets the idle wait time for the work item.

SetWorkItemData

Stores application-defined data associated with the work item.

Terminate

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

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Redistributable

Internet Explorer 4.0 or later on Windows NT 4.0 and Windows 95

Header

Mstask.h

Library

Mstask.lib

DLL

Mstask.dll

See also

ITask

 

 

Community Additions

ADD
Show:
© 2014 Microsoft