# Scheduled tasks and wake timers: who wakes your PC at night

> Find tasks that run at logon or on a schedule, check which ones can wake the machine, and disable the right one.

**Tested on**

- Build: 26300.9457 / 26100.33650
- Edition: Pro (26H2) / Server
- Architecture: x64
- Evidence: E1
- Verified: 2026-10-29

## The short answer

Scheduled tasks are the third autostart mechanism, after `Run` keys and the Startup folder. Task Manager does **not** show them.

Two properties decide whether a task affects you:

- **Trigger** — at logon, at startup, daily, on idle, on event.
- **Wake the computer to run this task** — whether it can pull the machine out of sleep.

```powershell
# tasks that run at logon or boot
Get-ScheduledTask |
  Where-Object { $_.Triggers.CimClass.CimClassName -match 'Logon|Boot' } |
  Select-Object TaskPath,TaskName,State |
  Sort-Object TaskPath | Format-Table -AutoSize
```

## Find the ones that actually run

```powershell
# enabled tasks with a logon trigger
Get-ScheduledTask |
  Where-Object { $_.State -ne 'Disabled' -and ($_.Triggers | Where-Object { $_.CimClass.CimClassName -eq 'MSFT_TaskLogonTrigger' }) } |
  Select-Object TaskPath,TaskName

# tasks allowed to wake the machine
Get-ScheduledTask |
  Where-Object { $_.Settings.WakeToRun -eq $true -and $_.State -ne 'Disabled' } |
  Select-Object TaskPath,TaskName

# what actually woke the machine last
powercfg /waketimers
powercfg /lastwake
```

`powercfg /waketimers` lists **pending** wake timers; `/lastwake` tells you what woke it most recently. Together they answer "why was my PC on at 3am" without guessing.

## Reading a task before disabling it

```powershell
$t = Get-ScheduledTask -TaskPath '\Microsoft\Windows\UpdateOrchestrator\' -TaskName 'Schedule Scan'
$t.Actions | Select-Object Execute,Arguments
$t.Triggers | Select-Object CimClass,StartBoundary,Enabled
$t.Settings | Select-Object WakeToRun,DisallowStartIfOnBatteries,ExecutionTimeLimit
```

Look at **Execute + Arguments**: the task name rarely matches what it does.

| Task area | What it is | Safe to disable? |
|---|---|---|
| `\Microsoft\Windows\UpdateOrchestrator\*` | update scans and installs | not permanently |
| `\Microsoft\Windows\Defender\*` | scans | adjust schedule, do not disable |
| `\Microsoft\Windows\DiskCleanup\*` | silent cleanup | yes |
| `\Microsoft\Windows\Application Experience\*` | telemetry/CEIP jobs | yes, cosmetic |
| vendor update tasks | drivers/BIOS checkers | your call |

> **Caution: Disabling update tasks does not stop updates**
>
> Windows Update has multiple paths (orchestrator, USO, service). Disabling one scheduled task is not a supported way to control updates — it just makes the timing unpredictable. Use the update policy settings instead.

## Wake timers: the 3am problem

A machine that wakes itself is usually one of:

- a **wake timer** (media, backup, update),
- **wake-on-LAN** packet from another device,
- a **USB device** allowed to wake the system,
- **Modern Standby** background activity (laptops).

```powershell
# devices allowed to wake the machine
Get-CimInstance -Namespace root\wmi -ClassName MSPower_DeviceWakeEnable |
  Where-Object Enable -eq $true | Select-Object InstanceName,Enable
```

Disable per device in **Device Manager → device → Power Management → Allow this device to wake the computer**, or via `powercfg /devicequery wake_armed`.

## The safe procedure

1. List enabled logon/boot tasks; note the vendors you recognise.
2. List wake timers; if the machine is a desktop that should sleep, disable the timer on the specific task.
3. Re-test one night.
4. Keep a note of what you disabled — future-you will need it after a feature update re-enables things.

## Related

- [Where the boot minute goes](https://winbook.fyi/en/windows/perf/boot-time/)
- [Services: what is safe to disable](https://winbook.fyi/en/windows/perf/services/)
- [Sleep, hibernate and Fast Startup](https://winbook.fyi/en/windows/perf/sleep-hibernate-faststartup/)

## Lab boundary

E1. Task Scheduler and `powercfg` behaviour is Microsoft-documented. The lab VMs have no real sleep states, so no wake event was reproduced.

## Sources

- [Microsoft Learn — Task Scheduler](https://learn.microsoft.com/en-us/windows/win32/taskschd/task-scheduler-start-page)
- [Microsoft Learn — Get-ScheduledTask](https://learn.microsoft.com/en-us/powershell/module/scheduledtasks/get-scheduledtask)
- [Microsoft Learn — Powercfg command-line options](https://learn.microsoft.com/en-us/windows-hardware/design/device-experiences/powercfg-command-line-options)

---

Source: https://winbook.fyi/en/windows/perf/scheduled-tasks/
