为什么我的任务总是在Windows 2008 Task Scheduler上运行

尼尔特

尝试使用Windows Task Scheduler计划任务时,Windows 2008 Server上出现一个奇怪的问题。

基本上,我已经设置了一个每天运行的任务,并使用一个URL调用Internet Explorer程序。

如果我从任务计划程序(以管理员身份登录)手动运行此任务,则可以正常运行,方法是启动任务并正确结束。

但是,现在我尝试将任务设置为在用户未登录时运行(以管理员身份)。

一切似乎都已正确设置,并且在出现提示时我已设置了管理员密码。但是,当我尝试从“任务计划程序”运行任务以确保它以该用户身份运行时,任务将启动,但永远不会结束,并且始终处于“正在运行”状态。

这是任务事件日志中的数据。

Task Scheduler launched action ""C:\Program Files\Internet Explorer\iexplore.exe"" in instance "{}" of task "\Daily Update".

Task Scheduler launched "{}"  instance of task "\Daily Update"  for user "administrator" .

Task Engine ":SERVERNAME\administrator:Password:"  received a message from Task Scheduler service requesting to launch task "\Daily Update" .

Task Scheduler started "{}" instance of the "\Daily Update" task for user "SERVERNAME\administrator".

Task Scheduler launch task "\Daily Update" , instance "C:\Program Files\Internet Explorer\iexplore.exe"  with process ID 5020.

任何想法为什么会发生这种情况以及如何解决这个问题?

Kousha

您正在使用Internet Explorer调用URL。IE将被打开,并且不会自行关闭。

要在计划的时间调用URL,建议您使用免费的计划服务,它是为完成这项工作而诞生的。

如果您坚持使用此方法,只需将IE替换为.vb文件即可调用您的URL:

'begin VBS script code: 

Call LogEntry()

Sub LogEntry()

'Force the script to finish on an error.
On Error Resume Next

'Declare variables
Dim objRequest
Dim URL

'The URL link.
URL = "http://www.example.com/?123"

Set objRequest = CreateObject("Microsoft.XMLHTTP")

'Open the HTTP request and pass the URL to the objRequest object
objRequest.open "GET", URL , false

'Send the HTML Request
objRequest.Send




'Set the object to nothing
Set objRequest = Nothing

End Sub

'end VBS script code

[免责声明:我属于ATrigger团队。它是免费软件,不是商业用途。]

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

为什么Windows 7 Task Scheduler任务失败并显示错误2147942667

使用Windows Task Scheduler运行批处理文件

使用Windows Task Scheduler每隔X分钟运行一次任务

Windows Task Scheduler无法运行VBScript

Task Scheduler提前几毫秒运行任务

从Windows Task Scheduler在虚拟环境中运行python脚本

无法通过Windows Task Scheduler运行我的python脚本

如何从Windows Task Scheduler在(ubuntu bash Windows 10)上运行程序

为什么op tf.tile()总是在CPU上运行,即使我已设置为在GPU上运行

Laravel Task Scheduler总是失败

Windows Task Scheduler不会在非系统驱动器上运行文件

通过Windows Task Scheduler运行Powershell脚本

在Windows Task Scheduler(Windows 7)中运行Powershell脚本

Windows Task Scheduler:计划任务每10秒运行一次

为什么我的Gradle任务总是运行?

Windows Task Scheduler图表?

Windows Task Scheduler上的文件更改

Server 2008 R2 Task Scheduler上的Access 2010宏无人值守

Windows Task Scheduler,如果任务未运行,请运行任务?

Windows Task Scheduler-每天登录一次运行任务

Windows .NET上的Task Scheduler的问题

Windows Task Scheduler未在事件上运行任务

使用Windows Task Scheduler运行PHP脚本,包括文件失败

如果启用了计划任务并在远程服务器上运行,则在本地禁用Windows Task Scheduler作业

如何使用Windows Task Scheduler来运行UpdatedB?

PowerShell脚本无法从Windows Task Scheduler中正常运行

Windows Server上的Laravel Task Scheduler

Windows Task Scheduler-如果满足两个触发条件,如何运行任务

从Windows Task Scheduler自动运行curl