What does HRESULT 0x80041316 (SCHED_E_UNEXPECTEDNODE) mean?

 
Previous Next
SCHED_E_SERVICE_NOT_RUNNING SCHED_E_NAMESPACE

SCHED_E_UNEXPECTEDNODE

SCHED_E_UNEXPECTEDNODE means the task XML contains an element that is not valid at its current location in the Task Scheduler schema. It is not a general XML syntax error: the document can be well-formed XML while still placing a valid-looking element under the wrong parent.

Diagnose structurally

  • Validate the exact XML being registered against the Task Scheduler XSD, rather than validating a template before variable expansion.
  • Compare the parent, child, and ordering requirements of the relevant schema element with the generated output.
  • Check whether a serializer emitted an element intended for another trigger or action type into the current one.

Correction

Move or remove the unexpected node according to the schema, then re-register the task. Do not strip unknown XML blindly: an unrecognized node can reveal that the task generator mixed two feature versions or emitted an unintended action type.

Microsoft: Task Scheduler status codes · Microsoft: Task Scheduler schema · Microsoft: schema elements


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