The Problem
Task Scheduler is the piece of Windows that runs things on a schedule — a backup script every night, a cleanup on Fridays, an app at logon. It has been in Windows for decades and it is genuinely powerful.
It also has a reputation for tasks that appear to be set up correctly and simply never run. That is almost always down to three settings people skip: the account the task runs as, whether it needs the user to be signed in, and the Start in field that scripts depend on. Get those right and it is reliable.
Worth knowing too: malware hides here. Knowing your way around Task Scheduler means you can spot something that does not belong.
Symptoms
- A task shows Ready but the Last Run Time never updates.
- Last Run Result shows
0x1,0x41301, or0x80070005. - The task works when you click Run but never fires on schedule.
- A script runs fine by hand but does nothing from Task Scheduler.
- Unfamiliar tasks appear with random names.
Step 1: Open Task Scheduler and Get Your Bearings
- Press Windows + R, type
taskschd.msc, and press Enter. Or search Task Scheduler in the Start menu. - The left pane is the task library, organised in folders. Task Scheduler Library → Microsoft → Windows holds Windows' own tasks — leave those alone.
- The middle pane lists tasks and their status; the bottom half shows the selected task's triggers, actions, and history.
- Create your own tasks in the top-level Task Scheduler Library, or make a folder of your own with Action → New Folder. Keeping yours separate makes them easy to find and audit later.
Step 2: Understand the Four Tabs
Every task is built from the same four parts, and knowing what each does saves most of the troubleshooting.
- General — the name, and critically the security options: which account it runs as, whether it runs when that user is signed out, and whether it runs elevated.
- Triggers — what starts it: a schedule, logon, startup, an idle period, or a specific event log entry.
- Actions — what it does: start a program, with optional arguments and a working directory.
- Conditions — extra gates: only on AC power, only when idle, wake the PC to run. These silently prevent tasks running on laptops more than anything else.
- Settings — retry behaviour, what to do if the PC was off at the scheduled time, and how long to allow before killing it.
Step 3: Create a Simple Task
- In the right pane, click Create Basic Task.
- Give it a clear name and description — you will thank yourself in six months.
- Choose a trigger: Daily, When I log on, When the computer starts, and so on.
- Choose Start a program as the action, then browse to the program or script.
- Click Finish, then tick Open the Properties dialog so you can adjust the settings in Step 4.
- Test it immediately: right-click the task → Run. If it fails here, it will never work on schedule.
Step 4: Set the Options That Make It Actually Run
This is where most tasks go wrong. Right-click your task → Properties → General.
- Run whether user is logged on or not — required for anything that must run overnight or on a locked machine. Windows asks for the account password when you save.
- Run with highest privileges — required for anything touching system folders, services, or the registry. Without it you get
0x80070005: fix error 0x80070005. - Configure for: Windows 10 — this is correct on Windows 11 too; the list has not been renamed.
- On the Conditions tab, untick Start the task only if the computer is on AC power for laptop tasks that should run on battery.
- On the Settings tab, tick Run task as soon as possible after a scheduled start is missed so a task does not simply skip when the PC was asleep.
- Tick If the task fails, restart every and set a sensible retry count.
Step 5: Run a PowerShell or Batch Script Correctly
Scripts fail from Task Scheduler far more often than programs do, and it is always the same three details.
- Set Program/script to the interpreter, not the script:
powershell.exe - Put the script in Add arguments, quoting the path:
-NoProfile -ExecutionPolicy Bypass -File "C:\Scripts\backup.ps1" - Set Start in to the script's folder — with no quotes, which is a genuine quirk of this field:
A script that uses relative paths fails silently without this.C:\Scripts - For a batch file, set Program/script to
cmd.exeand arguments to/c "C:\Scripts\job.bat". - Use full absolute paths inside the script itself. The task's environment is not your interactive session's.
Step 6: Read the History When Something Fails
- Select the task and open the History tab at the bottom. If it says history is disabled, click Enable All Tasks History in the right pane — it is off by default.
- Check Last Run Result in the task list and match it:
| Result | Meaning |
|---|---|
| 0x0 | Ran successfully |
| 0x1 | The program returned an error — usually a bad path or arguments |
| 0x41301 | Currently running |
| 0x41303 | Has never run |
| 0x80070002 | File not found — check the path and Start in |
| 0x80070005 | Access denied — tick Run with highest privileges |
- For deeper detail, cross-reference Event Viewer → Applications and Services Logs → Microsoft → Windows → TaskScheduler: how to use Event Viewer.
- Have the script write its own log file — the fastest way to see what it did when nobody was watching.
Step 7: Audit Tasks You Did Not Create
Scheduled tasks are a favourite persistence mechanism for malware and adware, because they survive reboots and attract no attention.
- Look through Task Scheduler Library for entries with random names, or ones pointing at
%TEMP%,%APPDATA%, or a folder you do not recognise. - Check each task's Actions tab to see exactly what it launches.
- Genuine Microsoft tasks live under Microsoft → Windows. Anything suspicious at the top level deserves scrutiny.
- Disable rather than delete while investigating, so you can put it back.
- Follow up with a full scan: remove a virus or malware from Windows 11 and remove a browser hijacker.
Step 8: Manage Tasks From the Command Line
Faster than the GUI once you know what you want, and scriptable.
- List everything in a readable table:
schtasks /query /fo TABLE - Show one task in full detail:
schtasks /query /tn "My Backup" /v /fo LIST - Run a task immediately:
schtasks /run /tn "My Backup" - Create one in a single command:
schtasks /create /tn "My Backup" /tr "powershell.exe -File C:\Scripts\backup.ps1" /sc daily /st 02:00 /rl HIGHEST - Export a task as XML so you can restore or copy it to another PC:
schtasks /query /tn "My Backup" /xml > C:\backup-task.xml - Run these from Terminal (Admin) — creating elevated tasks needs elevation.
What Not to Do
- Don't modify or delete tasks under Microsoft → Windows. They handle defragmentation, updates, and maintenance; breaking them causes problems that are hard to trace back.
- Don't store passwords in scripts that a scheduled task runs. Use Run whether user is logged on or not, which stores the credential in Windows' own vault: use a password manager safely.
- Don't use Task Scheduler to launch apps at logon when the Startup folder will do. Simpler is easier to maintain: disable startup programs.
- Don't leave a task set to retry every minute indefinitely after a failure. A failing task on a tight retry loop will fill logs and waste CPU.
Still Not Working?
If a task runs manually but never on schedule, work through them in order: the trigger's next-run time, the Conditions tab, the account it runs as, and whether the PC is actually awake at that time. If the PC sleeps, tick Wake the computer to run this task on the Conditions tab and confirm the power plan allows wake timers: fix sleep and hibernation not working.
Related: set up automatic backups, clean junk files and optimise your PC, and how to install WSL on Windows 11.
Related guides
How to Enable Virtualization (VT-x / AMD-V) in the BIOS
Emulators, WSL, and virtual machines all need CPU virtualization switched on in firmware. Here is where each manufacturer hides the setting.
How to Enable Hyper-V in Windows 11
Hyper-V lets you run virtual machines natively in Windows 11 Pro. Here is how to turn it on, create your first VM, and avoid the conflicts it causes.
How to Install WSL on Windows 11 (and Fix It When It Fails)
Run Ubuntu and other Linux distributions inside Windows 11 with WSL. One command installs it — here is that command, plus fixes for every common error.
How to Enter BIOS or UEFI Settings in Windows 11
Need to change boot order, enable TPM, or turn off XMP? Here is how to enter BIOS or UEFI on Windows 11 from inside Windows and with the setup key at startup.
Use Event Viewer to Find Why Your PC Crashed
Event Viewer records what failed before a crash, freeze, or blue screen. Learn which logs matter, how to filter out the noise, and how to read a minidump for the driver at fault.