我有一个C#控制台应用程序作为Windows Server 2008 R2上的计划任务。 Windows Task scheduler的应用程序计划在每15分钟后运行一次。 在申请结束的时候,
Logger.Log("Killing app"); Environment.Exit(0);
有时(可能是一个月一次),我的申请不会退出。 当我检查我的应用程序日志文件时,我看到了Killing app消息。 我相信没有恐慌,也没有崩溃。 只是应用程序不退出。 当我检查Task Scheduler ,在Last Run Result看到0xC000013A 。 既然不存在,下一次就停止工作了。 在同一时间(相差十分钟),我在事件日志中看到这条消息,
The description for Event ID 0 from source gupdate cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer. If the event originated on another computer, the display information had to be saved with the event. The following information was included with the event: Service stopped
我甚至不知道他们是否有关系。
不,他们没有关系。 您发现的事件日志消息与Google Update Service计划任务有关,它会对事件日志进行垃圾邮件处理,并且不包括完整的事件描述。
既然没有退出,那么下一次就停止我的工作
调查处理与后续调用重叠的任务的计划任务选项:
