Winforms 应用程序作为计划任务
我开发了一个 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要确保它以当前登录的帐户运行。如果它作为“系统”运行,我认为它不会正确显示。
我自己也有这样的一个……并且鄙视它。它之所以存在只是因为我没有机会将其重写为适当的服务。不要忘记,除了输出到控制台之外,还有更多记录方法。 ;)
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. ;)