Task Scheduler Error: The Task Image Is Corrupt or Has Been Tampered With (0x80041321): Safe Fixes in Windows 11 and 10


Last reviewed: November 25, 2026. This guide covers the Task Scheduler message that a task image is corrupt or has been tampered with; steps were compared with Microsoft documentation, none were run on a real PC, and the top picture is an illustration.
If you see the message the task image is corrupt or has been tampered with in Task Scheduler, in an app updater, or in Event Viewer, Windows has found a scheduled task whose saved copy and Windows' own record of it no longer agree. This guide explains what that means, how to find the task behind it, and the safe order of steps. For other Windows problems, see our PC repair guides.
Quick answer
Quick answer
- The message comes from Windows Task Scheduler. Microsoft's error list gives error code 0x80041321 the name SCHED_E_INVALID_TASK_HASH, described as "The task image is corrupt or has been tampered with."
- It usually means one task's saved definition and Windows' record of that task disagree, or the saved file is damaged. The message alone does not prove that anyone changed the task on purpose.
- Start with the least risky steps: note the task name in Event Viewer, then restart the PC.
- Export a copy of that one task, then repair or reinstall the app that created it so it can recreate the task.
- Do not delete registry keys under the TaskCache area by hand. This guide does not give those steps.
- Check system files with DISM, then SFC, and use System Restore or a malware scan only when the steps above point to them.
In this guide
- Why the task image is corrupt or has been tampered with appears
- Before you change anything
- Find the task in Event Viewer
- The safe order of steps
- Which step to take next
- Look at the task without changing it
- Export and disable only that one task
- Repair or reinstall the app that made the task
- Check system files after the app step
- Use System Restore after a recent change
- When the task name is unfamiliar
- Test for a software conflict with a clean boot
- Leftover tasks after an uninstall
- Why this guide skips registry steps
- Result card
- Frequently asked questions
- How this guide was checked
- Sources
Why the task image is corrupt or has been tampered with appears
Task Scheduler runs jobs for you at set times or when a trigger happens, such as a sign in or a system event. Each job is called a task. Microsoft's Task Scheduler documentation describes task definitions as XML, a structured text format that lists a task's triggers, actions and settings. Error 0x80041321 is one of the codes Task Scheduler returns when it will not trust a task to run.
The two copies that must agree
In plain words, a task has a saved definition, and Windows also keeps bookkeeping about that task. The error calls the saved definition the task image. On many builds the saved definition sits as an XML file in a Tasks folder on the system drive, commonly under C:\Windows\System32\Tasks, and part of the bookkeeping lives in the registry. The Microsoft pages we opened describe tasks as XML definitions but do not document these exact file or registry locations, so treat this picture as a general explanation rather than an official map.
When Task Scheduler reads a task, it can find that the saved definition and its record no longer match, or that the saved definition is damaged. It then refuses the task with 0x80041321. Microsoft's error list gives this code the name SCHED_E_INVALID_TASK_HASH, with the description "The task image is corrupt or has been tampered with." The word tampered is the error's own wording. On its own it does not prove that someone changed the task on purpose.
Possible causes include an install or update that stopped halfway, a program that was only partly removed, damage on the disk, or another program that changed the task. The message alone cannot tell these apart, so the steps in this guide start with the least risky actions.
Other codes that look similar
Do not mix this code up with its neighbours. Microsoft's list places 0x80041324 at SCHED_E_TASK_ATTEMPTED, which means the service tried to run a task but the task did not run because of a constraint in its definition. It places 0x80041318 at SCHED_E_INVALIDVALUE, which means the task XML holds a value that is badly formatted or out of range. Those problems can need different fixes, so check the exact code before you follow any guide.
Common symptoms and where they appear
The message can show up in a few places. The table below helps you match what you see with the first place to look. Wording can differ a little between Windows builds and between apps.
| Symptom | What it usually points to | Where to look first |
|---|---|---|
| Pop-up with 0x80041321 when an app checks for updates | An app's scheduled update task has a bad saved copy | Event Viewer, then the app's own repair option |
| Error when you open one task in the Task Scheduler Library | That single task's definition or its record | Task properties, then the look-only steps |
| Same message after several restarts | The task is still registered and still refuses to run | Export a copy, then repair or reinstall the owning app |
| Message about a task you do not recognise | Owner unknown, so the source is not yet clear | Malware check first, with no edits |
Before you change anything
Before you change anything
Create a restore point before any step that changes a task or an app. The System Restore section later in this guide explains what it does, so read it first. Keep a written note of the task name, its folder, the Event Viewer time and the app name. Export a copy of any task before you disable it. If anyone suggests editing registry keys under the TaskCache area, stop and back up the registry first, as explained in how to back up the registry.
Most of the steps in this guide only read information. Start with those. The steps that change something are marked, and each one has a reason to be there.
Find the task in Event Viewer
The fastest way to name the task is the Task Scheduler log in Event Viewer. Once you have the name and the time of the error, every later step becomes more precise.
Open the Task Scheduler Operational log
Applications and Services LogsMicrosoftWindowsTaskSchedulerOperational
We could not confirm this exact log path on a Microsoft page in this check, so treat it as the route commonly shown on current Windows builds. Menu names can differ between builds. If the Operational log is not listed, check the log view options before you conclude that it is missing.
- Open Event Viewer. Search for it from the Start menu and open it.
- Go to the Task Scheduler log. Expand the path above in the left pane and select Operational.
- Find the error near the time you saw the message. Look for an event that mentions the task image, the 0x80041321 code or a task path.
- Write down the details. Note the event time, the task name and folder path quoted in the event, and any app name that appears in the text. A folder path under Microsoft usually means a Windows task, while a path with an app's name usually belongs to that app.
You should see: a list of events with times, and at least one event that names a task or its path near the time of the message.
If this does not help: some events do not name the task. Compare the time of the message with the tasks in the Task Scheduler Library that were created or updated around that time, and continue with the look-only steps below.
The safe order of steps
Work through these steps in order and stop as soon as the message is gone. Each step changes a little more than the one before it, so the early steps come first.
- Restart the PC. A restart is the least risky step and can settle an install or update that stopped halfway. Restart, then check whether the message returns.
- Look at the task. Read its details in the Task Scheduler Library and, if you wish, print its definition on the command line. This changes nothing.
- Export a copy, then disable that one task. Keep the copy for your record. Disable only the task named in the event.
- Repair or reinstall the app that created the task. The app can recreate its own task in the correct form.
- Check system files. Run DISM first, then SFC, following the steps in the system file guide.
- Use System Restore if the problem began after a recent change. Only restore to a point made before the change.
- Run a malware check if the task name is unfamiliar. Do this before you delete or disable anything you cannot identify.
- Test for a conflict with a clean boot. Use it when the owner of the task is still unclear.
Which step to take next
Use this decision tree after the restart. It shows where to go from the result you see, so you do not need to follow every step in the list above.
- Did the message stop after the restart?
- Yes: keep an eye on it for a few days. If it returns, note the time and go back to Event Viewer.
- No: is the task name one you recognise?
- Yes, it belongs to an app you use: export that task, disable only that task, then repair or reinstall the app. Still failing? Go to the system file check, then System Restore, then the clean boot.
- No, the name is unfamiliar: run a malware check first. Go back to the task only after the check is finished.
- It is a leftover from a program you removed: use the leftover tasks section below.
Look at the task without changing it
Reading a task does not change it. Start here so you know exactly what the task is before you touch it. Open the Task Scheduler app, expand the Task Scheduler Library, and find the task name from the event. Open the task and read its name, location, author, description and the account it runs under. Tab names can differ between builds, so look for the same details wherever they appear.
You can also print the stored definition from a command prompt. The command below only reads the task. Replace the example path with the exact name from the event, and keep the quotation marks.
schtasks /query /tn "\Microsoft\Windows\ExampleFolder\ExampleTask" /xml
Microsoft's Schtasks.exe page, which we opened, describes the query syntax and says that the /XML switch displays task definitions in XML format. Check schtasks /query /? on your build for the exact switches, because the help text can differ between builds.
You should see: a block of XML that starts with a task element and lists the triggers and actions. You can copy that output into a text file as a record.
If this does not help: the query may report that the task cannot be found. The name must match exactly, including the folder path, so copy it from Task Scheduler rather than retyping it.
For a broader look at what starts with Windows, including tasks and startup entries, read our Autoruns steps for a safe startup check. Use it to look, not to delete anything.
Export and disable only that one task
Do this only after you have written down the task name and read its details. The aim is a recoverable copy and one stopped task, not a clean sweep of the Library.
Export a copy for your record
Right-click only the task named in the event. If your build shows an Export option, choose it and save the XML file in a folder you can find again. Menu names can differ between builds, so look for an entry with that meaning. If export does not work, keep the printed XML from the look-only step in a text file instead.
Disable the task, not the folder
Right-click only that task and choose Disable if your build offers it. Do not disable whole folders, and do not change tasks you do not recognise. Microsoft's schtasks page says that an enabled task can run and a disabled task cannot run, so a disabled task stops running until it is enabled again.
You should see: the task's status changes to disabled, and the message should no longer come from that task when its trigger would have fired.
If this does not help: the message may come from another task. Return to Event Viewer and check the next event with the same time and path. Do not delete the task at this stage. Deleting is a later option, and only for a task you know is a leftover.
Repair or reinstall the app that made the task
Most tasks come from an app that installed them, and that app can usually recreate its task. Open Settings, go to Apps, then Installed apps, find the app, and choose Modify or Repair if the app offers it. Menu names can differ between builds.
SettingsAppsInstalled apps
If there is no repair option, uninstall the app and install it again from the publisher's official site. Follow the careful steps in our guide on how to uninstall programs completely, so the removal is clean and you do not leave half a program behind. If the uninstall itself fails, read the fixes for fixes for an app that will not uninstall.
Good to know
Reinstall only the app that owns the task. Do not uninstall unrelated programs to see whether the message changes, because that makes the cause harder to find.
You should see: the app runs its own repair or install, and its task appears again in the Task Scheduler Library. Check the next time the app runs, because some tasks only fire on a trigger.
If this does not help: the app may not be the owner. Go back to the event details, then move on to the system file check.
Check system files after the app step
If the message stays after the app step, Windows system files may be damaged. The safe order is DISM first and then SFC. The system file guide already covers those commands, so we do not repeat them here.
Read our guide on SFC and DISM repair steps for the commands and their order. If SFC reports corrupt files and cannot repair them, the guide on what to do when SFC cannot fix files explains how to read the log.
Before you change anything
Create a restore point before running repair tools. Repair tools can take a long time and change many files, so keep your note from Event Viewer close at hand.
You should see: a result from the repair tool that either reports no problems or lists what was repaired. Re-check Event Viewer for new events after the repair.
If this does not help: go to System Restore if the problem began after a recent change. If the cause is still unknown, use the clean boot section.
Use System Restore after a recent change
If the message began right after an install, an update or an uninstall, System Restore can return system settings to an earlier point, but only if a restore point was made before that change. Read our step guide on whether System Restore restores the registry to see which parts it covers, and our guide on how to use System Restore for the steps themselves.
Use this step only when the timing fits. Restoring to an old point can remove apps and drivers installed after that point, so write down what changed since then before you start.
When the task name is unfamiliar
A task name you do not recognise is not proof of an attack, and it is not proof that the task is safe either. Before you disable or delete an unfamiliar task, check where it comes from and what it runs. Our guide on how to remove a virus or malware covers a careful scan. For registry-related signs, see malware and registry entries with safe checks.
Run a full scan with the security tools already on the PC. Do not turn off Windows Security or any other protection to make the message go away, and do not download single-purpose tools to hunt for the task. If the scan finds a threat, follow the removal steps in the guide and leave the task alone until the scan is finished.
Test for a software conflict with a clean boot
If you still cannot tell which software owns the task, a clean boot starts Windows with fewer services and startup items. It helps you test whether the message still appears when only the essential parts run. Follow the steps in our guide on clean boot steps to find a conflict, and use its undo steps afterwards so that every item is turned back on.
If service messages appear alongside the pop-up, the guide on Service Control Manager error codes explains the related messages. Those errors are separate from the task image message, but they can appear on the same PC.
You should see: the message is gone during the clean boot. Re-enable items in small groups, and check after each group, so you find the item that brings the message back.
If this does not help: the owner is still not clear. Use the Repair Assistant to narrow down the symptom, or ask the app's publisher which tasks it creates.
Leftover tasks after an uninstall
After an uninstall, a scheduled task can stay behind and point to files that no longer exist. That can trigger the same message. Our guide on leftover services and scheduled tasks covers this case in detail. Startup items from the same app are covered in registry startup entries and how to find them.
Registry traces from the same app are a separate topic. The guide on leftover registry entries after uninstalling explains what is usually harmless and what to leave alone.
Before you change anything
Remove a leftover task only after you have exported it and confirmed that its app is really gone. Never remove a task that belongs to Windows itself.
Some tasks belong to Windows. For Windows Automatic Maintenance, see what Windows Automatic Maintenance runs. If the task is connected to Windows Update, use the guide on Windows Update repairs, which owns those steps, so this article does not repeat them.
Why this guide skips registry steps
You may find posts online that tell you to delete keys under the TaskCache area of the registry. We do not give those steps. None of the Microsoft pages we opened describes deleting these keys as a fix for this error, and a wrong delete can leave a task half removed or break tasks that work.
Registry cleaners are not a fix for this message either. No Microsoft page we opened documents a speed or repair benefit of registry cleaning, and this guide does not recommend one. For the registry basics, see how the registry is organised, and for reading values safely from the command line, see reading the registry with reg query.
If you ever feel a registry change is needed, back up first with a restore point and a registry export, and ask the app's publisher before going further. General context for registry problems is in how to fix a corrupted registry and common registry problems and their causes.
Result card
Use this card to check where you are after each step. Find the row that matches what you see and take the next step listed in it.
| Result | What it means | Next step |
|---|---|---|
| Message gone after the restart | A half-finished install or update may have settled | Keep the note with the task name in case it returns |
| Message gone after the app repair | The owning app recreated its task | Let the app run once and check its task again |
| Message stays and the task is identified | The saved definition still disagrees with Windows' record | Export and disable that one task, then repair or reinstall the app |
| Message stays and no owner is found | The source is still unknown | Run a malware check, then try a clean boot |
If none of the rows fits what you see, go back to the decision tree above and start again from the restart.
Frequently asked questions
About the error and the task
Does this message mean a virus is on my PC?
Not necessarily. The message means that a task's saved copy and Windows' record of it disagree, or that the saved copy is damaged. A malware check is a reasonable step when the task name is unfamiliar, and the steps for it are above.
What does error 0x80041321 mean?
Microsoft's error list names it SCHED_E_INVALID_TASK_HASH and describes it as a task image that is corrupt or has been tampered with. It is a Task Scheduler error, not a general Windows error.
Can I simply delete the task?
Not as a first step. Write down its name, export a copy, and disable only that task. Delete it later, and only if you know it is a leftover from a program that has been removed.
Is this the same as error 0x80041324?
No. Error 0x80041324 is SCHED_E_TASK_ATTEMPTED, which means a task did not run because of a constraint in its definition. The fixes for the two codes can differ, so check the code you actually see.
Fixing it safely
Do I need to edit the registry to fix this?
No. This guide does not give registry steps for this error. If you read advice that asks you to delete TaskCache keys, back up the registry first and ask the app's publisher before you change anything.
Will System Restore fix it?
It may help if the message began after a recent change and a restore point exists from before that change. Read the System Restore steps first, so you know what will be undone.
Which step should I try first?
Restart the PC first. Then read the task in Event Viewer and the Task Scheduler Library, and repair or reinstall the app that owns the task.
When should I use a clean boot?
Use it when you cannot tell which software owns the task. A clean boot helps you test for a software conflict, and you should undo its changes once you are done.
How this guide was checked
Steps were compared with Microsoft documentation where that documentation exists, and they were not run on a real PC. The error name and value come from Microsoft's Task Scheduler error and success constants page. The query, disable and XML descriptions come from Microsoft's Schtasks.exe page, and the storage description is a general explanation because the Task Scheduler pages we opened do not document exact file or registry locations.
Some items could not be confirmed on a Microsoft page during this check: the Event Viewer log path, the menu names for Export and Disable, the Tasks folder location and the TaskCache area. Each is hedged in the text. No testing, lab work, people or credentials are claimed for this guide.