Windows 10 - Task Scheduler - Not running (0x41303)
Asked Answered
D

15

29

I'm trying to schedule a task in Windows 10, on the event of "At log on" in order to start several programs, but it won't run after several trial/error. The task is configured as follows:

  • General: Run whether user is logged on or not (it prompted the credentials inputbox, also tried Run only when user is logged on). Run with highest privilegies. Configure for Windows 7 and Windows 10 options where tried.
  • Triggers: At log on, any user, enabled (tried specific user too).
  • Actions: Start a program, which are "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe", "C:\Program Files\Internet Explorer\iexplore.exe" (this one has Add Arguments: %HOMEDRIVE%%HOMEPATH%), "D:\ids\sqldeveloper\sqldeveloper\bin\sqldeveloper64W.exe". The route were copy/paste from the shortcut properties of each program.
  • Conditions: No condition were set.
  • Setting: No additional settings.
  • History: disabled.

When I restart and log on, nothing happens. Checking the status panel appears the summary of the task, where in the Last Run Time is 30/11/1999 12:00:00 a.m., the Last Run Result is (0x41303), and Status column is Ready.

Tried to look others questions, but seems to be others problems. What am I missing? Is there another configuration that I must apply? Thanks in advance.

Donatist answered 29/12, 2016 at 14:55 Comment(3)
I had the 41303 error, but I'd forgot I'd ticked "on idle" conditionDittman
Do you find an answer here? social.technet.microsoft.com/Forums/en-US/…Mentalist
@Dominique. Unfortunately no. This still looks to be a problem even after so many years.Cuddle
J
13

I had this problem as well (Windows Server 2019), with error 0x41303 and Last Run Time set to 30/11/1999.

When I changed the start time to a future time instead of past (i.e. 2 minutes from current time), the scheduled task ran successfully (result: 0x0) and repeated just fine per the trigger.

Jibheaded answered 16/10, 2019 at 7:17 Comment(2)
This works perfectly for me. It definitely should be accepted.Smalltime
I didn't think your solution was going to work... after hours of trying to fix it... I finally tried and fixed it exactly as you said :-) mistery of windows... thanksss!Portwine
I
7

Task Scheduler 0x41303: Task has not yet run.

The main reason for this is if the scheduler's first run is set in the past or simply hasn't run yet. To fix:

  • Try running it manually
    or
  • Set the next trigger in the near future.

    The last run result should update indicating it ran but if it still doesn't run, check the task conditions.
    A full list of task scheduler return codes
Intend answered 8/5, 2020 at 4:42 Comment(0)
O
2

Got the same error code when scheduling a python script, fixed it by changing Conditions > Network to "Any connection" or disabling it entirely.

Ophthalmologist answered 14/1, 2019 at 22:44 Comment(1)
Dude you save my whole week :), I had problem with Chrome driver while scraping data from sites, and when I run manually console application it works without problem but when I run app with task scheduler I got exception Chrome unreachable.Seise
D
2

I had spaces in my script that was being called and had to change it to have quotes around it. Maybe this will help someone

Dragonet answered 30/4, 2020 at 16:9 Comment(1)
I noticed that this is your first post. In the future please note that StackOverflow uses a different design than forum threads or reddit style threads. Please only post Answers which completely, clearly, and thoroughly describe a solution or explain the problem. As your answer currently stands it would have been better as a comment. Welcome to StackOverflow, and good job answering your own question :)Packsaddle
S
2

Try open "trigger" tab, and edit the trigger detail. I found here my trigger was not enabled, I've just enabled it. This could generate error 0x41303.

Stipple answered 20/10, 2020 at 13:47 Comment(0)
S
1

On General Tab: Choose "Run whether user is logged on or not" Tick "Run with highest priviledge"

On Trigger Tab: Make sure status is "Enabled"

Survive answered 22/5, 2022 at 10:11 Comment(0)
C
1

It could be anything, you need to find out the exact reason, the code doesn't help much unfortunately. There's another answer here about seeing the History, but the issue is that it's turned off by default. You need to turn it on first, then do a manual run. Below instructions for Win11 (google Win10 if you need to).

  1. See "Actions" pane on the right, click "Enable All Tasks History"
  2. Trigger a run for your task, right click and click "Run"
  3. Check History tab, it should appear below when you have the task selected. The History tab should not have "(disabled)" next to it, go back to Step (1) to try to enable it.

In my case, I had selected run only when the user is logged on, and the "user" was "Administrators", and for some reason I wasn't considered part of that user/user group. Changed it to "Users" and it started working.

Clio answered 21/6 at 0:3 Comment(0)
F
0

Use "&&" in between the commands instead of commas and as far as possible try to give the absolute path to the arguments, hope this helps.

OR

You can create a ".bat" file with the different commands in it.

Fatherinlaw answered 30/11, 2019 at 12:24 Comment(0)
W
0

I think there's several possible reasons for this Last Run Result code. If you enable the task History and try running the scheduled task manually, you can check the History tab for events and should be able to get more information, such as an error code or error reason. Once you have that, you should be able to Google for the specific error message that you're getting.

Walkling answered 11/6, 2020 at 19:26 Comment(0)
B
0

In my case the run user (-User) was disabled and I constantly receive the code 267011 (0x41303). To check it run Get-LocalUser.

Brattice answered 1/9, 2021 at 15:13 Comment(0)
B
0

Setting the trigger start further into the future didn't seem to help. While not always going to be the right solution, running the task as SYSTEM got rid of 0x41303 for me.

$script = { "hello world" | write-host }

$registerJob = {
    param($script)
    $taskName = "Hello World"
    Unregister-ScheduledJob -Name $taskName -ErrorAction Ignore
    $job = Register-ScheduledJob -Name $taskName -ScriptBlock $([scriptblock]::create($script)) -RunEvery $([TimeSpan]::FromMinutes(1)) -MaxResultCount 1
    $psSobsSchedulerPath = "\Microsoft\Windows\PowerShell\ScheduledJobs";
    $principal = New-ScheduledTaskPrincipal -UserId SYSTEM -LogonType ServiceAccount 
    $someResult = Set-ScheduledTask -TaskPath $psSobsSchedulerPath -TaskName $taskName -Principal $principal
}

# Run as Administrator needed in order to call Register-ScheduledJob
powershell.exe -command $registerJob -args $togglePowerOverlay
Baughman answered 5/9, 2021 at 7:38 Comment(0)
S
0

Solution 1: Schedule your task for 2 minutes in the future.

Solution 2: Restart your computer if Windows has any update warning

Smokechaser answered 29/11, 2023 at 16:55 Comment(0)
D
0

Press F5.

No, seriously. I see this issue every time I'm working with a new task and it has always been a refresh issue. When you create a task for the first time the display shows the internal code 0x41303 meaning "no first result yet". Run the task (either manually trigger it or just schedule it a few minutes into the future) and after it runs hit F5. The displayed table is refreshed and - hopefully your task has completed at least once - you'll now see the correct Last Run Result code.

Depalma answered 30/1 at 8:21 Comment(0)
I
0

My fix was timeout. If you want your task to stay running permanently, then there are check boxes you might want to try unticking.

[] Stop the task if it runs longer than x [] If the running task does not end when requested, force it to stop

Impotent answered 27/3 at 14:19 Comment(0)
M
-1

In my case I launch task using another domain account but this account doesn't had rights for this. I added rights for launch task using this instruction.

Mishandle answered 3/8, 2020 at 11:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.