5

When I schedule a task to run "At system startup" in Windows 10 task scheduler it runs well on reboot. But if I choose shutdown, and then turn on the system with the computer's power button, it does not run the task.

The History tab in task properties as well does not contain records related to system cold boot time.

What could be wrong?

2 Answers 2

4

This is due to the Fast Startup Windows 10 feature.

On "Shutdown", by default, Windows 10 actually hibernates the kernel. And then the "cold boot" is actually a resume from kernel-only hibernation. Counterintuitively, "Restart" leads to the the actual cold boot.

Instead of disabling hibernation you can trigger the task on the "resume from hibernation" event:

enter image description here

For some reason I had to go through the "Custom" option for the task to trigger correctly. So here's the trigger in XML in case something doesn't work:

    <EventTrigger>
      <Enabled>true</Enabled>
      <Subscription>&lt;QueryList&gt;&lt;Query Id="0" Path="System"&gt;&lt;Select Path="System"&gt;*[System[Provider[@Name='Microsoft-Windows-Power-Troubleshooter'] and EventID=1]]&lt;/Select&gt;&lt;/Query&gt;&lt;/QueryList&gt;</Subscription>
    </EventTrigger>

Microsoft Community thread: Scheduled "At Startup" task that worked in Windows 7 no longer works after upgrade to Windows 10

2

Following solution worked for me. Disable hibernation:

Run Command Prompt as Administrator
Execute following command:
powercfg.exe /h off

If it did not help, possible next step would be to disable Fast Startup.

1
  • Wow. I can't seem to google anything about this bug. I wonder how reliable this is, but it works (turning hibernation off). Commented Sep 11, 2021 at 13:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .