Skip to content

Latest commit

 

History

History
129 lines (101 loc) · 3.52 KB

nf-mstask-ischeduledworkitem-run.md

File metadata and controls

129 lines (101 loc) · 3.52 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:mstask.IScheduledWorkItem.Run
IScheduledWorkItem::Run (mstask.h)
Sends a request to the Task Scheduler service to run the work item.
IScheduledWorkItem interface [Task Scheduler]
Run method
IScheduledWorkItem.Run
IScheduledWorkItem::Run
Run
Run method [Task Scheduler]
Run method [Task Scheduler]
IScheduledWorkItem interface
_msb_ischeduledworkitem_run
mstask/IScheduledWorkItem::Run
taskschd.ischeduledworkitem_run
taskschd\ischeduledworkitem_run.htm
taskschd
f533fcf6-8ece-442f-b6d5-3702321db9e9
12/05/2018
IScheduledWorkItem interface [Task Scheduler],Run method, IScheduledWorkItem.Run, IScheduledWorkItem::Run, Run, Run method [Task Scheduler], Run method [Task Scheduler],IScheduledWorkItem interface, _msb_ischeduledworkitem_run, mstask/IScheduledWorkItem::Run, taskschd.ischeduledworkitem_run
mstask.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
Mstask.lib
Mstask.dll
Windows
Internet Explorer 4.0 or later on Windows NT 4.0 and Windows 95
19H1
IScheduledWorkItem::Run
mstask/IScheduledWorkItem::Run
c++
APIRef
kbSyntax
COM
Mstask.dll
IScheduledWorkItem.Run

IScheduledWorkItem::Run

-description

[[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.] ]

Sends a request to the Task Scheduler service to run the work item.

-returns

The Run method returns one of the following values.

Return code Description
S_OK
The operation was successful. The request was sent. For more information, see Remarks.
E_INVALIDARG
The arguments are not valid.
E_OUTOFMEMORY
Not enough memory is available.

-remarks

Run is an asynchronous operation. A return code of S_OK means that the request to run the work item has been made; it does not mean that the work item has started running. There may be a delay of a few seconds after Run returns before the work item actually starts running.

To determine whether the work item is running, call IScheduledWorkItem::GetStatus.

Examples

For an example of how to start a task, see Starting a Task Example.

-see-also

IScheduledWorkItem

IScheduledWorkItem::GetStatus

ITask