Site icon EfmSoft

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. The documented description is “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.

Evidence to preserve

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

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.

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 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.

Exit mobile version