0X8004131A

Fix SCHED_E_MALFORMEDXML Error (0X8004131A) in Task Scheduler

Windows Errors Intermediate 👁 6 views 📅 Jul 3, 2026

Task Scheduler says your task XML is broken. We'll fix it by rebuilding the task from scratch.

That error is annoying. Let's fix it.

You open Task Scheduler, double-click a task, and get this: SCHED_E_MALFORMEDXML (0X8004131A). The task XML is malformed — basically the file that stores the task got corrupted. This happens after a Windows update messes with it, or after you edited the task manually and made a typo.

The fix: Delete and recreate the task

Don't waste time trying to repair the XML file. It never works right. The real fix is to delete the broken task and create a fresh one.

  1. Open Task Scheduler. Press Windows + R, type taskschd.msc, and hit Enter.
  2. On the left panel, find the task folder. It's usually under "Task Scheduler Library". Look for the task with the error.
  3. Right-click the broken task. Choose Export. Save the .xml file somewhere like your Desktop.
  4. Now right-click the same task and choose Delete. Confirm when asked.
  5. On the right panel, click Import Task. Choose the .xml file you just saved.
  6. You'll see the Import Task window. Click OK or Finish. The task reappears in the list.
  7. Double-click the fresh task to open its properties. Everything should look normal now. Click OK to save.

After step 6, you should see the task back in the list. No more error when you double-click it. Try editing or running the task — it should work fine.

Why this works

When you export the task, Task Scheduler writes a clean copy of the XML. When you then delete the task, it removes the corrupted file from the system. Importing the clean XML creates a brand-new task file. It's like copying your notes to a fresh notebook when the old one has coffee stains.

Less common variations

Variation 1: You can't even export the task

If right-clicking and choosing Export does nothing or gives a different error, the XML is too damaged. Here's what to do:

  • Open Notepad as admin. Navigate to C:\Windows\System32\Tasks. Find the task file (it's named like your task, no extension). Open it. You'll see raw XML.
  • If you know XML, try fixing syntax errors. But honestly, just delete the file from that folder. Then open Task Scheduler (refresh with F5) and create the task from scratch using the Create Task wizard.

Variation 2: The error appears when running a backup software like Acronis or EaseUS

Some backup programs create tasks that get corrupted during Windows updates. Try this instead:

  • Uninstall the backup software completely using Revo Uninstaller (free version works).
  • Restart your PC.
  • Reinstall the latest version of the backup software from the official site.
  • The fresh install creates a new task that should work.

Variation 3: The task is from a third-party app like Adobe or Google Update

These companies push updates that sometimes break their own tasks. Try:

  • Repair the app from Control Panel > Programs and Features. Right-click the app, choose Change, then Repair.
  • Or uninstall and reinstall the app.

Prevention: How to avoid this error

Three things help a lot:

  • Never edit task XML manually. Use the Task Scheduler UI. If you need advanced options, use PowerShell instead of Notepad.
  • Back up your tasks. Every month, open Task Scheduler, right-click Task Scheduler Library, choose Export All. Save the folder somewhere safe.
  • Keep Windows updated. Most corrupted XML errors come from old OS bugs that later updates fix. Run Windows Update regularly.
Pro tip: If you have many tasks, use this PowerShell command to backup all tasks at once:
schtasks /query /XML > C:\Backup\tasks.xml
This saves all tasks in one XML file. Not perfect, but faster than one-by-one.

Was this solution helpful?