3.2.5.4.19 SchRpcGetNumberOfMissedRuns (Opnum 18)

The SchRpcGetNumberOfMissedRuns MUST return the number of times a task was scheduled to run but did not due to the server being unavailable (for example, powered off).

 HRESULT SchRpcGetNumberOfMissedRuns(
   [in, string] const wchar_t* path,
   [out] DWORD* pNumberOfMissedRuns
 );

path: MUST contain the full path to a task, in the format specified in section 2.3.11.

pNumberOfMissedRuns: MUST be the address of a DWORD that receives the number of times a task was scheduled to run but did not.

Return Values: For more information about return codes, see section 2.3.14, or Win32 Error Codes in [MS-ERREF] section 2.1.

Upon receipt of the SchRpcGetNumberOfMissedRuns call, the server MUST:

  • Return the number of runs missed since the last successful run. If the task has not yet run in the pNumberOfMissedRuns parameter and if the parameter is non-NULL, the server MUST return the number of runs missed since registration instead.

  • Return S_OK when:

    • The path is not present.

    • The path is not in the specified format.

  • Return S_OK.<81>