Winforms 应用程序作为计划任务

发布于 2024-11-03 10:48:05 字数 413 浏览 2 评论 0原文

我开发了一个 winforms 应用程序,用于对数万名学生进行批处理,现在我们尝试将其作为计划任务每​​晚运行。

我个人认为能够登录到盒子并通过查看 GUI 来查看它是如何处理的,尽管将其转换为命令行应用程序的标准方法。(这从根本上限制了我可以使用的屏幕实际数量)登录消息)

我可以将应用程序作为计划任务运行吗,负责调度的 IT 人员说它没有运行,因为它是一个 winform 应用程序。是否需要任何技巧才能让它运行良好,或者我是否被迫将其重写为命令行应用程序,并具有 80 个字符的宽度限制。

基本上,我只是将日志文件实时回显到屏幕上,以便更轻松地调试问题。所以gui只是输出。

它以当前登录的用户身份运行,但问题是,如果用户当前未登录到盒子上,它就不会运行,所以当我们离开过夜时,它就无法运行。

谢谢,

埃里克-

I've got a winforms app that I developed to do batch processing on tens of thousands of students, now we're trying to run it nightly as a scheduled task.

I personally find it useful to be able to login to the box and see how it's processing by looking at the GUI, though the standard way it to convert it into a commandline app.(which radically limits the amount of screen realestae I can use for loggin messages)

Can I run the app as a schedueld task, the IT Guy whos scheduling says it's not running because it's a winform app. Are there any tricks needed to get it to run well, or am I forced to rewrite it as a commandline app with it's 80 char width limit.

Basicaly I just echo the log file to the screen in realtime to make debugging issues easier. So the gui is output only.

Its' running as the currently loggedin user, but the issue is that it does not run if the user is not currently logged in on the box,so when we leave for the night it fails to run.

Thanks,

Eric-

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

悲凉≈ 2024-11-10 10:48:05

您需要确保它以当前登录的帐户运行。如果它作为“系统”运行,我认为它不会正确显示。

我自己也有这样的一个……并且鄙视它。它之所以存在只是因为我没有机会将其重写为适当的服务。不要忘记,除了输出到控制台之外,还有更多记录方法。 ;)

You need to make sure it is running as the currently logged in account. If it runs as 'system' I don't think it will show up correctly.

I have one of these myself... and despise it. It only exists because I haven't had a chance to rewrite it into a proper service. Don't forget there are more ways to log than just outputting to the console. ;)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文