question

ThoreLenhartzen-2651 avatar image
0 Votes"
ThoreLenhartzen-2651 asked ThoreLenhartzen-2651 edited

Task Scheduler misses all tasks scheduled to run at night

I have added a task that shall run at 3 o'clock in the morning every night. It has been working fine for years but some weeks ago, I discovered that it was no longer running.
After checking around a bit I also discovered that no other tasks scheduled at night (when computer is sleeping) was running. They all are started as soon as I unlock the computer. Then I get a "Misses task started" warning.

Tasks that are started when I am logged in seems to be running according to schedule.

Here is an example:
88940-image.png



The task should be running as SYSTEM user with highest priveleges whether I am logged on or not.
89054-image.png



All tasks trigged on times when the computer is asleep behaves the same way. I have not changed any of the auto-generated tasks but I have played around with several test-tasks checking things like "Enabled", "Wake the computer....". Nothing helps.

Any help on this matter would be highly appreciated!


windows-serverwindows-10-general
image.png (47.8 KiB)
image.png (21.7 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ThoreLenhartzen-2651 avatar image
0 Votes"
ThoreLenhartzen-2651 answered ThoreLenhartzen-2651 edited

YESS ! That did it. Thank you Dgorter!
I will not speculate on why or how it worked, byt this was helpful at last:

powercfg /setacvalueindex 381b4222-f694-41f0-9685-ff5bb260df2e 238c9fa8-0aad-41ed-83f4-97be242c8f20 bd3b718a-0680-4d9d-8ab2-e1d2b4ac806d 1

best regards Thore


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ArtemiyMorozUA avatar image
0 Votes"
ArtemiyMorozUA answered ThoreLenhartzen-2651 edited

hi there! I would suggest you open BIOS settings and check if your BIOS allows Wake on RTC signal.


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

It must be allowed in BIOS. Has been working for years.
I have not done anything in BIOS for as long as I can remember, but I will check just to be sure.

0 Votes 0 ·
Dgorter avatar image
0 Votes"
Dgorter answered ThoreLenhartzen-2651 converted comment to answer

Hello,
Open an elevated cmd prompt:
Run powercfg /query
Look for the section on Allow Wake timers
Similar to >Power Setting GUID: bd3b718a-0680-4d9d-8ab2-e1d2b4ac806d (Allow wake timers)
Check the current AC and DC power setting Index values
What are the values on them?

Also open gpedit.msc ( Start - run gpedit)
Check this policy
Computer configuration - administrative Templates - Windows Components - Maintenance Scheduler
What is the value of Automatic Maintenance Wakeup Policy

· 6
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for your answer. Please see values below.

 Power Setting GUID: bd3b718a-0680-4d9d-8ab2-e1d2b4ac806d  (Allow wake timers)
     GUID Alias: RTCWAKE
     Possible Setting Index: 000
     Possible Setting Friendly Name: Disable
     Possible Setting Index: 001
     Possible Setting Friendly Name: Enable
     Possible Setting Index: 002
     Possible Setting Friendly Name: Important Wake Timers Only
     Current AC Power Setting Index: 0x00000000
     Current DC Power Setting Index: 0x00000001

90790-image.png



0 Votes 0 ·
image.png (6.3 KiB)
Dgorter avatar image Dgorter ThoreLenhartzen-2651 ·

Hello,
Line 9 above - Current AC Power Setting Index: 0x00000000
Looks to disable Wake Timers when the machine is plugged in.
Is this a desktop or a laptop?
Is the machine plugged in at night when you expect the scheduled tasks to occur?
If this is a laptop can you try it with the machine on battery power overnight to see the scheduled task run?

Thanks
Darrell

0 Votes 0 ·

It is a desktop - always plugged in.
What about the Line 9 above - Current AC Power Setting Index: 0x00000000?
Can that be showstopper? Anything be done to change that?

0 Votes 0 ·
Dgorter avatar image Dgorter ThoreLenhartzen-2651 ·

Hello,
This is what I think the command should be:
powercfg /setacactivelist /bd3b718a-0680-4d9d8ab2-e1d2b4ac806d 0

however trying this on my machine does not accept the command.
The UI does not offer this up as an option.
Power registry setting appear to part of blob so no good way to determine what the correct entry is.

0 Votes 0 ·
Show more comments
CarlFan-MSFT avatar image
0 Votes"
CarlFan-MSFT answered ThoreLenhartzen-2651 commented

Hi@ ThoreLenhartzen-2651,
Thank you for your information.
Please type "winver" in Search Bar to check the OS build.
Perform a clean boot and disable security software temporarily.
https://support.microsoft.com/en-us/topic/how-to-perform-a-clean-boot-in-windows-da2f9573-6eec-00ad-2f8a-a97a1807f3dd
As you said, "Wake the computer to run this task" and other options had been checked. But all tasks set up to run at specific times are missed unless you logged in.
I also can't confirm if the parameters on the properties have something wrong. It has been working fine for years but some weeks ago it didn't work. If delete one task and recreate, if it works fine.
Hope this helps and please help to accept as Answer if the response is useful.
Best Regards,
Carl

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for your answers so far.
Build number: Version 20H2 (OS Build 19042.928)

I have tried to delete and create several new tasks doing more or less nothing, just a batch file writing date and time to a text file.
And please note that it is not only tasks I have created that has problems. Tasks created by Microsoft, Brave, Google, DropBox etc. are also missed and started when I log in og wake the PC.
BUT: I made a test last night where I set Power option / Sleep = "Never". And all tasks that were set to run at night ran as planned.
Will check out what happens after a clean boot/disabled security software later.

Best Regards
Thore



0 Votes 0 ·

I have now tried a clean boot disabling all non-Microsoft services and all programs in the start-up group in task manager are disabled.
The result is the same: none of the tasks scheduled to run at night is started. They start when I wake the computer.
The only thing that will let the tasks start seems to be that I set sleep-time to "Never"
Do you have any other ideas of what can be tried to find out more about this problem?

0 Votes 0 ·
CarlFan-MSFT avatar image
0 Votes"
CarlFan-MSFT answered ThoreLenhartzen-2651 commented

Hi,
According to your description, would you please check the task schedule history, is there any event log regarding this issue?

Also did you got the "Run task as soon as possible after a scheduled start is missed" checkbox checked?
Meanwhile I suggest that you could check for update firstly.
If any security updates found be found, installing to check.
Hope this helps and please help to accept as Answer if the response is useful.
Best Regards,
Carl

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks for your response.
I just checked and there are no waiting Windows updates.
And; Yes I have the "Run task as soon as possible..." checked. I think that is why the tasks are started at all.
The funny thing is that all tasks set up to run at specific times are missed unless I am logged in when it happens. This goes for ALL tasks, both the ones I have created and tasks created by Microsoft, Brave, Google, DropBox etc.
I also have tried to check the "Wake the computer to run this task" on some of them, but to no help.

0 Votes 0 ·