使用 Windows 调度程序运行控制台应用程序

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8743494/
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-15 18:47:51  来源:igfitidea点击:

Run Console application using Windows Scheduler

.netwindowswindows-server-2008scheduled-tasksscheduler

提问by Ravia

I have created a console application which run selenium test and open up browser, when running the application exe file it works fine both in Debug & Release mode.

我创建了一个控制台应用程序,它运行 selenium 测试并打开浏览器,当运行应用程序 exe 文件时,它在调试和发布模式下都可以正常工作。

When I try to schedule this console application using Windows Scheduler it starts open up command window but does not open browser.

当我尝试使用 Windows Scheduler 调度此控制台应用程序时,它会启动打开命令窗口但不打开浏览器。

I am using Window Server 2008 to test this application.

我正在使用 Window Server 2008 来测试这个应用程序。

Do I need to add some special permissions to run it as task

我是否需要添加一些特殊权限才能将其作为任务运行

采纳答案by seldary

Have you tried running the scheduled task with a specific account (ie, your account)? LocalSystem is quite different than a "regular" user account.

您是否尝试过使用特定帐户(即您的帐户)运行计划任务?LocalSystem 与“常规”用户帐户完全不同。