Windows 中的计划任务需要用户登录这一事实的解决方法 [英] A workaround for the fact that a scheduled task in Windows requires a user to be logged in

查看:71
本文介绍了Windows 中的计划任务需要用户登录这一事实的解决方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行一个由第三方创建的小型可执行文件,它需要在 Windows 2008 服务器上定期运行.这个可执行文件有效地将信息从一个系统传输到另一个系统,并且需要全天候运行大约每小时一次.作为其处理的一部分,可执行文件会启动一个小的 Windows 窗体类型的 UI.

I am running a small executable created by a third party that needs to run at regular intervals on a Windows 2008 server. This executable effectively ETLs information from one system to another and needs to run every hour or so around the clock. As part of its processing the executable launches a small Windows Forms type UI.

我已经设置了一个计划任务来调用该文件,并且仅当配置为运行该任务的用户登录到计算机(本地或通过远程桌面)时,这才有效.如果我将任务设置为以其他用户身份运行,或者将任务设置为在用户未登录时运行,则计划任务会执行并出错.我尝试以不同的用户身份运行,包括管理员用户和系统用户.是否有任何可能的解决方法(不更改我无法访问的第三方代码),允许在没有特定用户登录的情况下运行此代码.

I have set up a scheduled task to call the file and this works ONLY if the user under which the task is configured to run is logged onto the machine (either locally or via Remote Desktop). If I set the task to run as another user, or set the task to run when the user is not logged, on the scheduled task executes and errors. I have tried running as different users including Administrator user and System user. Is there any possible workarounds (without changing the third party code which I have no access to) which would allow this code to be run without a specific user logged in.

推荐答案

GUI 应用程序需要一个桌面,而登录用户只能获得其中一个.

The GUI app needs a desktop and you only get one of those for a logged in user.

这篇关于Windows 中的计划任务需要用户登录这一事实的解决方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆