Quartz.NET 故障预防/检测方法
我几乎完成了基于 Quartz.NET 的 Windows 服务(使用 ADO.NET,而不是 RAM 作业)。该服务根据计划将文件复制/移动到各种路径。不过,我有一些担忧。非常重要的是,该服务具有某种检测方法/系统,可以检测程序何时因任何原因而失败 - 无论是文件无法复制,还是整个调度程序崩溃。只是想知道你们认为最好的方法是什么?我有一些模糊的想法,但我希望听到更多的意见。
I have nearly completed a Quartz.NET based Windows Service (using ADO.NET, not RAM jobs). The service copies/moves files to various paths depending upon a schedule. I have some concerns however. It is very important that this service has some sort of detection method/system that will detect when the program has failed for whatever reason - whether it's files failing to be copied, or the whole scheduler crashing . Just wondering what you guys think is the best way to do this? I have a couple of vague ideas but I'm looking to hear some more input.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以下是我们使用的方法:
我们使用 IT 监控系统来监控 Windows 服务本身。我们使用其中一种商业产品来监视服务器、服务、数据库等,但如果您还没有合适的开源项目,也可以使用开源项目来执行此操作。
我们将致命异常记录到数据库表中,并有一个单独的服务监视该表的异常情况。
我们还使用 ADO.Net 存储,因此我们还监视 Quartz.net 表中是否存在诸如卡住触发器之类的情况。
有了这样的东西,你绝对可以走上工程化的道路。只需记住添加每个选项的成本效益,然后决定您想要在监控上投入多少工作,以及中断的成本。
Here are the methods that we use:
We monitor the windows service itself using the IT monitoring system. We use one of those commercial products that monitors servers, services, databases, etc, but there are open source projects that can do this for you if you don't already have one in place.
We log fatal execeptions to a database table and have a separate service monitoring that table for exceptions.
We also use an ADO.Net store, so we also monitor the Quartz.net tables for things like stuck triggers.
With things like this you can definitely go down the over engineering path. Just keep in mind the cost benefit of adding each of these options and then decide how much work you want to put into monitoring, VS the cost of an outage.