Share via


Scheduled task does not run and stays at 0x41303

Question

Monday, March 12, 2018 4:10 PM | 1 vote

Have a very easy requirement (although I know that nothing is easy with Microsoft): Should create a scheduled task that runs one time on each client. Have created the task with computer GPO preferences with the following settings:

- Triggers: One Time (the current time is specified in "Details")

- Settings: "Run the task as soon as possible after a scheduled start is missed"

- Settings: "Allow the task to be run on demand"

What happen on the client: The GPO works and the task is created with the configured settings. However, the task never starts. Status remains at 0x41303 ("the task has not yet run" forever (waited for an hour, have rebooted the test client, nothing change). As soon as I start the task manually from the task scheduler on the client, the task starts immediately.

Thank you in advance for any advice.

Franz

All replies (16)

Monday, March 12, 2018 9:42 PM ✅Answered | 4 votes

Been a few threads were Task Scheduler does not run as expected (search this forum for task to see examples). The task do not seem to run if first set to run in the past, even if they are set to run multiple times.

So try as a test setting it in the near future doing a gpupdate and waiting see if that works. Might make rolling it out to many workstations interesting.

 


Friday, March 16, 2018 10:37 AM ✅Answered

Thank you for your explications.

- I see that Microsoft obviously doesn't anymore make any documentation about essential Windows components like the task scheduler. Who is ss64.com?

- My question is what the task scheduler is doing when two one time triggers are configured like in the printscreen below:

But since Microsoft doesn't document their Windows task scheduler, probably only "try and error" will show if the "Run the task as soon as possible after a scheduled start is missed" will work or not in this configuration. And Microsoft can change this behavior with every monthly cumulative patch.

It's a major bug that the option "Run the task as soon as possible after a scheduled start is missed" is dependent of the configured triggers. This option has nothing to do with any triggers.


Tuesday, March 13, 2018 2:34 AM | 1 vote

Hi Franz,

Firstly, I suggest you create the same scheduled task on one test machine manually to see if it can run as expected.

Then follow this guide to find why your task does not run:

•There is no active Shell (explorer.exe)
•If a process/service tries to display a message box, the task will not complete
•Non-interactive
•Apps creating globally named objects
•Possible network communication failures

Help! My Scheduled Task does not run…

https://blogs.technet.microsoft.com/askperf/2015/02/18/help-my-scheduled-task-does-not-run/

Note: Please also read the comments in the bottom of the page. It may help you.

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].


Tuesday, March 13, 2018 5:22 PM

Been a few threads were Task Scheduler does not run as expected (search this forum for task to see examples). The task do not seem to run if first set to run in the past, even if they are set to run multiple times.

So try as a test setting it in the near future doing a gpupdate and waiting see if that works. Might make rolling it out to many workstations interesting.

 

Thank you very much, this works!

@ Karen_Hu and @[email protected]: Do you have any information when Microsoft will fix this bug, or if there is a Windows 10 Hotfix for that?

Scheduled Tasks do not run as they should, and startup scripts don't work as well and shouldn't be used anymore according Microsoft (https://blogs.technet.microsoft.com/askpfeplat/2015/04/26/the-startup-script-is-dead/). 


Tuesday, March 13, 2018 5:29 PM

Thank you for the link, but the problem is the Bug that Mr. Happy described.

It's not practical at all that the scheduled task has to be configured to run in the feature. We need to run a task as soon as possible. But when we schedule the task for tomorrow as an example, the task will never run at all clients that are not in the Office tomorrow, because when this clients apply the GPO, the run time will be in the past.

@ Karen_Hu and @[email protected]: Do you have any information when Microsoft will fix this bug, or if there is a Windows 10 Hotfix for that?


Wednesday, March 14, 2018 9:44 AM

Did you set it running multiple times or one time?

If it's one time and when it applied to client, the time is in the past it won't run by design. This is reasonable.

If it's multiple time and when it applied to client, the other time point except for start time is in the further, it should run at other time point.

According to your first post, it seems that yours is one time task, right? If so, that's normal.  What you should do is make your group policy applied more quickly to meet the right time.

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].


Wednesday, March 14, 2018 1:52 PM | 1 vote

If it's one time and when it applied to client, the time is in the past it won't run by design. This is reasonable.

The scheduled job is configured as described in the initial question:

- Triggers: One Time (the current time is specified in "Details")

- Settings: "Run the task as soon as possible after a scheduled start is missed"

My mother tongue is not English, but I'm sure that the two settings are crystal clear, and the second setting "Run the task as soon as possible after a scheduled start is missed" clearly says that a task that has a missed schedule should run as soon as possible.

"This is resonable": Are you joking, or do you really mean what you write? Or do you have to act according Microsoft Guidelines that obviously say "it's not a bug, it's a feature" regardless the issue? 


Thursday, March 15, 2018 9:28 AM | 1 vote

Hi Franz,

Please read "Run task as soon as possible after a scheduled start is missed" explanation:

This option does not run a missed job immediately, which you might reasonably expect. There is a 10-minute delay. So if a job was missed because the PC was off, it will run exactly 10 minutes after  the computer is powered back on.
If multiple jobs are missed, they will all start at the same time: exactly 10 minutes after  the computer is powered back on.
This delayed start is not shown in under 'Next Run Time', but will appear under 'Last Run Time' once the job has run.

Note: This option is ignored completely if the job has a "ONE Time" trigger.

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].


Thursday, March 15, 2018 11:13 AM

Hi Karen,

Thank you for your explications.

- The 10 minutes delay is no problem and understandable. "Soon" can mean 10 minutes.

- But your second remark "This option is ignored completely if the job has a "ONE Time" trigger" makes no sense at all to me. Why should be this option be dependent of the number of triggers?

1. Where do you have this information from? A link to an official Microsoft documentation (Technet or so) would be useful. Google only finds forum posts.

2. If we configure the scheduled job in GPO preferences with the option ""Run the task as soon as possible after a scheduled start is missed" and with two one time triggers, for example with one hour between them, and this GPO is applied on a computer system at a later time than the two one time triggers: Will the task scheduler start the job or not?

Best regards,

Franz


Friday, March 16, 2018 10:01 AM

It's coming from here.

How did you set the two one-time trigger?

According to the information, it seems if the trigger is one time it will ignore this configuration.

Please Note: Since the website is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].


Monday, March 19, 2018 9:36 AM

Hi,

According to your situation, I suggest modify your task configuration. Or run gpupdate /force before time reaching.

And then submit your feedback via built-in Feedback app.

Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].


Tuesday, May 22, 2018 7:53 PM

I'm running into this problem on a Windows 10 (1803) newly installed system.

The task is a PowerShell script.  it is set up to run "At system startup".

Despite the Task Scheduler service is "Running", the task did not run at system boot.  It did not run even when I manually forced it to run from inside the Task Scheduler (right-click, "Run").

Despite the Status is "Ready", nothing happened.  The Last Run Time remains at "11/30/1999 12:00:00 AM".  The Last Run Result remains "the task has not yet run. (0x41303)".

What now?

--svb


Tuesday, May 22, 2018 9:16 PM

I'm running into this problem on a Windows 10 (1803) newly installed system.

The task is a PowerShell script.  it is set up to run "At system startup".

Despite the Task Scheduler service is "Running", the task did not run at system boot.  It did not run even when I manually forced it to run from inside the Task Scheduler (right-click, "Run").

Despite the Status is "Ready", nothing happened.  The Last Run Time remains at "11/30/1999 12:00:00 AM".  The Last Run Result remains "the task has not yet run. (0x41303)".

What now?

--svb

Please create a new thread for your issue as it is different to one this post is about.


Monday, August 20, 2018 10:43 PM

You can't run a Powershell script as scheduled task or as GPO startup script. You can schedule a startup task to run a batch file which calls the PS script and this should work.


Tuesday, October 2, 2018 2:02 PM

You can't run a Powershell script as scheduled task or as GPO startup script. You can schedule a startup task to run a batch file which calls the PS script and this should work.

This is wrong.

I have an image that runs a scheduled task that runs a powershell script.

I have the Action start a Program

"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"

in the Arguments field

"-ExecutionPolicy Bypass C:\Scripts\NameOfYourScript.ps1"

I have it configured as a Win10 task, run whether user is logged on or not with highest privileges.

This runs on first boot at log on of any user and works flawlessly.


Wednesday, November 14, 2018 4:51 PM

Open properties for the scheduled task
Click Pane /History\
Here you can see the events connected to the scheduled task

with status remaining on 0x41303 it could be the scheduled task is set to run as a specific user and that user is not logged on the computer.

Either logon as the user specified to run the scheduled task or set the scheduled task to run weather or not the user is logged in on the /general\ pane 

Kiki