Quick Answer
Delete the corrupted task from %SystemRoot%\System32\Tasks and rebuild it in Task Scheduler. That’s the only fix that reliably works.
What’s Actually Happening Here
ERROR_INVALID_TASK_INDEX (0X0000060F) pops up when you try to run, modify, or query a scheduled task and Windows can’t match the index number you gave to an actual task in the scheduler’s internal database. The index isn’t the task name — it’s a position number used internally by the ITaskScheduler COM interface. This error usually means the task’s entry in the %SystemRoot%\System32\Tasks folder is missing, corrupted, or points to a file that doesn’t exist.
Most common trigger: You imported a task XML from another machine, or you manually deleted a .job file from that folder without removing it via Task Scheduler UI. The scheduler’s registry cache in HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree still has an index pointing to a file that’s gone. So when you try to access it, Windows returns 0X0000060F.
Fix Steps
- Open Task Scheduler as admin — right-click Start, select “Computer Management,” go to Task Scheduler. Or run
taskschd.mscfrom an admin command prompt. - Locate the broken task — look in the left pane under “Task Scheduler Library.” The task may show an error icon (yellow triangle) or just disappear when you click it. If you can’t find it, skip to step 4.
- Delete the task from the UI — right-click the offending task and select “Delete.” If it won’t delete because of the error, move to step 4.
- Delete the task file directly — open
%SystemRoot%\System32\Tasksin File Explorer. Look for a file whose name matches the failing task (case-insensitive). Delete it. You’ll need admin rights — accept the UAC prompt. - Clean the registry cache — open
regeditas admin. Navigate toHKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree. Find the entry with the same name as the deleted task. Right-click and delete it. Don’t touch anything else in that key — you can break your scheduled tasks permanently. - Rebuild the task — go back to Task Scheduler, right-click “Task Scheduler Library,” choose “Create Task” or “Import Task…” if you have the original XML. Set up your trigger and action manually. Test it by right-clicking and hitting “Run.”
- Reboot — restart Windows to flush any cached references.
Alternative Fixes If the Main One Fails
- Use PowerShell to remove it — run PowerShell as admin and execute
Unregister-ScheduledTask -TaskName "TaskName" -Confirm:$false. This bypasses the UI and deletion scripts the index directly. Still fails? The registry entry is corrupt — manually nuke it as described in step 5. - System Restore — roll back to a restore point before the error started. Works if you have one. Doesn’t help if the corruption is recent or you don’t have restore points enabled.
- Repair the Task Scheduler service itself — in an admin command prompt, run
sfc /scannowthenDISM /Online /Cleanup-Image /RestoreHealth. This fixes system files but leaves theTasksfolder contents alone. So it only helps if the error is from a corrupted scheduler DLL, not a broken task entry.
Prevention Tip
Never manually delete files from %SystemRoot%\System32\Tasks or edit the TaskCache\Tree registry key unless you’re absolutely certain of what you’re doing. Always use Task Scheduler UI or PowerShell’s Unregister-ScheduledTask cmdlet to remove tasks. If you must backup tasks, export them as XML from the UI — don’t copy the .job files directly. They’re tied to internal GUIDs and will break on a different system or after a restore.
And if you’re writing scripts that create or manage tasks, always check the return value of ITaskScheduler::Activate or RegisterTaskDefinition in your code — 0X0000060F is a runtime error that you can catch and handle gracefully. Don’t assume the task index will always be valid.