Windows 10 - 任务计划程序 - 未运行 (0x41303)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/41382074/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 19:46:29  来源:igfitidea点击:

Windows 10 - Task Scheduler - Not running (0x41303)

windowswindows-10scheduled-tasks

提问by Sebastian Motavita

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:

我正在尝试在 Windows 10 中安排一项任务,在“登录时”事件中启动多个程序,但在多次尝试/错误后它不会运行。任务配置如下:

  • 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.
  • 常规:无论用户是否登录都运行(它提示凭据输入框,也尝试仅在用户登录时运行)。以最高权限运行。尝试配置 Windows 7 和 Windows 10 选项。
  • 触发器:登录时,任何用户,启用(也尝试过特定用户)。
  • 操作:启动一个程序,分别是“C:\Program Files (x86)\Google\Chrome\Application\chrome.exe”、“C:\Program Files\Internet Explorer\iexplore.exe”(这个有添加参数: %HOMEDRIVE%%HOMEPATH%), "D:\ids\sqldeveloper\sqldeveloper\bin\sqldeveloper64W.exe"。路线是从每个程序的快捷方式属性复制/粘贴的。
  • 条件:未设置条件。
  • 设置:无额外设置。
  • 病史:残疾。

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

当我重新启动并登录时,没有任何反应。检查状态面板会显示任务的摘要,其中上次运行时间30/11/1999 12:00:00 am上次运行结果(0x41303)状态列是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.

试图看别人的问题,但似乎是别人的问题。我错过了什么?我必须应用其他配置吗?提前致谢。

回答by SaeX

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

我也遇到了这个问题(Windows Server 2019),错误为 0x41303,上次运行时间设置为 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.

当我将开始时间更改为未来时间而不是过去时间(即距当前时间 2 分钟)时,计划任务成功运行(结果:0x0)并根据触发器重复得很好。

回答by Prateek Sharma

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.

您可以创建一个包含不同命令的“.bat”文件。

回答by user13442327

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

我的脚本中有被调用的空格,必须将其更改为在其周围加上引号。也许这会帮助某人

回答by webberist

Task Scheduler 0x41303: Task has not yet run.

任务计划程序 0x41303:任务尚未运行。

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

回答by Patrolin

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

调度 python 脚本时得到相同的错误代码,通过将条件>网络更改为“任何连接”或完全禁用它来修复它。