Export (0) Print
Expand All

ITaskSettings::StartWhenAvailable property

Gets or sets a Boolean value that indicates that the Task Scheduler can start the task at any time after its scheduled time has passed.

This property is read/write.

Syntax


HRESULT put_StartWhenAvailable(
  [in]   VARIANT_BOOL startWhenAvailable
);

HRESULT get_StartWhenAvailable(
  [out]  VARIANT_BOOL *pStartWhenAvailable
);

Property value

If True, the property indicates that the Task Scheduler can start the task at any time after its scheduled time has passed. The default is False.

Error codes

NameMeaning
S_OK

The property value was successfully set or retrieved.

Remarks

This property applies only to time-based tasks with an end boundary or time-based tasks that are set to repeat infinitely.

Tasks that are started after the scheduled time has passed (because of the StartWhenAvailable property being set to True) are queued in the Task Scheduler service's queue of tasks and they are started after a delay. The default delay is 10 minutes.

When reading or writing XML for a task, this setting is specified in the StartWhenAvailable element of the Task Scheduler schema.

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

ITaskSettings
Task Scheduler
ITaskSettings

 

 

Community Additions

ADD
Show:
© 2014 Microsoft