What does HRESULT 0x00041305 (SCHED_S_TASK_NOT_SCHEDULED) mean?

 
Previous Next
SCHED_S_TASK_NO_MORE_RUNS SCHED_S_TASK_TERMINATED

SCHED_S_TASK_NOT_SCHEDULED

Task lacks required scheduling properties

SCHED_S_TASK_NOT_SCHEDULED is HRESULT 267013 (0x00041305) from winerror.h. AllStat describes it as “One or more of the properties that are needed to run this task on a schedule have not been set.” 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 one or more of the properties that are needed to run this task on a schedule have not been set. The high-level request can be considered complete after it only when its documented postcondition has been checked.

Where the status is encountered

  • Task Scheduler status monitoring; log the exact method and object state instead of interpreting the constant outside that contract.
  • Deployment or maintenance task validation; log the exact method and object state instead of interpreting the constant outside that contract.
  • Automation that reads task state before starting work; log the exact method and object state instead of interpreting the constant outside that contract.

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

  • preserve serialized task XML.
  • preserve trigger count and enabled flags.
  • preserve action count.
  • preserve principal information.
  • preserve validation output from RegisterTaskDefinition.

Also record sched_s_task_not_scheduled_operation, sched_s_task_not_scheduled_state_before, sched_s_task_not_scheduled_state_after, UTC time, process and thread identifiers, component version, and a correlation ID. Protect user data in logs and keep only the identifiers required to reproduce component state.

What must be true before accepting it

Verify that the task is registered but one or more settings required to compute scheduled runs are absent. The verification prevents it from being promoted to broader success than the producing API promised.

The component may have changed durable or in-memory state before returning it; inspect that state first.

Correct handling and recovery

Validate the complete task definition, especially triggers and required principal or action fields. Correct the definition through the Task Scheduler API and re-query next-run information before claiming recovery.

Retry it only when a documented input or state has changed. Retry policy must follow the owning state machine rather than a generic transient-error loop.

Difference from nearby results

SCHED_S_TASK_DISABLEDIt

The nearby-status comparison controls whether outputs are usable and whether more work is expected.

Practical scenario

An installer registers an action but omits every trigger.

References


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