What does HRESULT 0x00041302 (SCHED_S_TASK_DISABLED) mean?

 
Previous Next
SCHED_S_TASK_RUNNING SCHED_S_TASK_HAS_NOT_RUN

SCHED_S_TASK_DISABLED

Scheduled task is disabled

SCHED_S_TASK_DISABLED is HRESULT 267010 (0x00041302) from winerror.h. The documented description is “The task will not run at the scheduled times because it has been disabled.” 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 will not run at the scheduled times because it has been disabled. Acceptance depends on the returned state and outputs, not only on the cleared severity bit.

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.

What must be true before accepting it

Verify that the disabled state is intentional or authorized and not the accidental result of configuration drift. This check separates a legitimate outcome from code that ignores an incomplete or altered operation.

Before retrying the operation, classify its effects as completed, partial, pending, cancelled, adapted, or terminal.

Evidence to preserve

  • Preserve enabled flag from the definition.
  • Preserve last modification time and author.
  • Preserve task XML hash.
  • Preserve security descriptor.
  • Preserve last enable or disable event.

Difference from nearby results

SCHED_S_TASK_NOT_SCHEDULED lacks scheduling properties; it has a definition but is explicitly prevented from scheduled execution.

The distinction around it determines whether the caller stops, waits, consumes output, or changes state.

Correct handling and recovery

Do not retry the scheduled execution. Determine who disabled the task, preserve the task XML, and enable it only after validating credentials, triggers, and the operational reason for the previous disablement.

Practical scenario

A compliance task stops reporting. The status shows it was disabled during troubleshooting, so support restores the approved definition and audits the change rather than rebuilding triggers unnecessarily.

References


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