ITaskSettings3::CreateMantenanceSettings method

Creates a new instance an IMaintenanceSettings object and associates it with this ITaskSettings3 object.

Syntax


HRESULT CreateMantenanceSettings(
  [out, retval] IMaintenanceSettings **ppMaintenanceSettings
);

Parameters

ppMaintenanceSettings [out, retval]

A pointer to a pointer to the IMaintenanceSettings object this method creates.

Return value

If the method succeeds, it returns S_OK. Otherwise, it returns an error code.

Remarks

When battery saver is on, Windows Task Scheduler tasks are triggered only if the task is:

  • Not set to Start the task only if the computer is idle... (task doesn't use IdleSettings)
  • Not set to run during automatic maintenance (task doesn't use MaintenanceSettings)
  • Is set to Run only when user is logged on (task LogonType is TASK_LOGON_INTERACTIVE_TOKEN or TASK_LOGON_GROUP)

All other triggers are delayed until battery saver is off. For more information about accessing battery saver status in your application, see SYSTEM_POWER_STATUS. For general information about battery saver, see battery saver (in the hardware component guidelines).

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Taskschd.h

IDL

Taskschd.idl

Library

Taskschd.lib

DLL

Taskschd.dll

See also

ITaskSettings3

 

 

Show: