如何在Win XP Professional中管理计划任务
我在 c# .Net 2005 中创建了一个 exe。 安排它每天上午 10 点在服务器上运行。 但当预期任务完成时,我无法关闭 exe,因此它保持打开状态,并且任务计划显示其状态为正在运行,因为它在任务管理器中也很令人满意,并且当第二天其运行时间开始运行时,它不会运行。
只有第一次它才能正常运行(当它没有在计划中运行时),但如果它正在运行,那么 exe 也不会运行。 我还在任务计划的“设置”中设置了选项“如果运行 1 小时则停止任务”,但此选项也不会停止通过计划运行 exe。
您能告诉我应该如何使用 Windows 任务计划安排 exe 以便它每天运行吗?
谢谢
I created a exe in c# .Net 2005.
Scheduled it to run on the server every day at 10 AM.
But I can not close the exe when intended task is completed so it remains open and Task Schedular shows its status as running as it is also plesent in Task Manager and When next day its run time come to run then it dosen't run.
At first time only it runs properly (When its in not running in Schedular) but if it is running then again exe is not runnoing.
I also set the option 'Stop Task if it runs 1 Hr' in 'Setting' in task schedular but this option also not stop running exe through schedular.
Can you please tell how should I schedule exe using windows Task Schedular so that it will run every day.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道您的 C# 应用程序是否是 Windows 窗体应用程序。但如果是,您可以尝试在执行结束时调用
Application.Exit()
方法。I don't know if your C# application is a Windows Forms app or not. But if it is you may try to call
Application.Exit()
method at the end of execution.