开发者

Windows Scheduled Task, Detecting Failure Programmatically

开发者 https://www.devze.com 2023-03-11 19:04 出处:网络
I\'d like to develop a monitor to detect failed scheduled tasks and开发者_如何学运维 tasks that have run for over \'x\' minutes. I\'m looking for ideas to probe status of tasks and detect a failure co

I'd like to develop a monitor to detect failed scheduled tasks and开发者_如何学运维 tasks that have run for over 'x' minutes. I'm looking for ideas to probe status of tasks and detect a failure code (or receive a status of running). I'd also like to verify the "stop running after 'x' hours" setting.


Have the scheduled task log its start time, end time, and end status in a database. All you need to do is query for the latest entries in the start and end tables to know the current status. As a bonus it gives you a history.

0

精彩评论

暂无评论...
验证码 换一张
取 消