Site icon EfmSoft

What does HRESULT 0x00041303 (SCHED_S_TASK_HAS_NOT_RUN) mean?

 
Previous Next
SCHED_S_TASK_DISABLED SCHED_S_TASK_NO_MORE_RUNS

SCHED_S_TASK_HAS_NOT_RUN

Scheduled task has no completed run history

SCHED_S_TASK_HAS_NOT_RUN is HRESULT 267011 (0x00041303) from winerror.h. AllStat describes it as “The task has not yet run.” The severity bit indicates a nonfailure result, but the value carries a specific condition that must not be collapsed into plain S_OK.

In the Task Scheduler state query, this result means that the task has not yet run. Before reporting completion for it, the caller must reconcile the code-specific state transition and every usable output.

What must be true before accepting it

Verify that the absence of a prior run is explained by creation time, trigger eligibility, or history retention instead of being reported as an execution failure. Without that proof, this result can mask a caller error even though HRESULT failure severity is not set.

Reconcile side effects associated with this result before compensation or a second invocation is attempted.

Where the status is encountered

Because it is informational, a language binding may expose it as success and hide the symbolic distinction. Keep the original HRESULT available until the code-specific branch has run.

Evidence and telemetry

Also record sched_s_task_has_not_run_operation, sched_s_task_has_not_run_state_before, sched_s_task_has_not_run_state_after, UTC time, process and thread identifiers, component version, and a correlation ID. Telemetry for it should omit credentials while retaining nonsecret object identities and version data.

Correct handling and recovery

Compare task registration time with trigger boundaries and service uptime. If a run should already have occurred, inspect missed-start policy, credentials, conditions, and Task Scheduler operational events.

Retry it only when a documented input or state has changed. An unchanged retry after it is useful only when the API explicitly advances through repeated calls.

Practical scenario

A newly deployed weekly task returns this status on the same day it was registered. Monitoring suppresses the failure alarm until the first eligible trigger, while retaining a deadline for the expected first run.

A regression test should reproduce it, assert the relevant outputs and state, then change only the decisive condition and verify the expected neighboring result or ordinary completion.

Difference from nearby results

SCHED_S_TASK_READYIt

Correctly separating it from neighboring values selects the proper continuation and cleanup path.

References


Looking for a different code? Search another status or error code.

Exit mobile version