使用 spring crontrigger 安排作业时出现问题
我的应用程序面临着一个非常奇怪的行为。我有一个使用 Spring3 并在 tomcat6 上运行的应用程序,它通过 spring 的 crontrigger 安排作业。
我的 cron 表达式是“0 0 3 * * ?”,它应该每凌晨 3 点(每天一次)解雇我的工作。直到昨天,我的应用程序(和我的工作)都运行良好。这晚事情变得疯狂了,我的工作开始者不断地工作。就好像运行时忽略了 cron 表达式,并开始无限循环地执行我的工作。
这对你们中的任何人有意义吗?
I'm facing a quite strange behavior of my application. I have an application that uses Spring3 and runs over tomcat6 and it schedules jobs through spring's crontrigger.
My cron expression is "0 0 3 * * ?", which should fire my job every 3am (once a day). My application (and my jobs) were working fine until yesterday. This night the things went crazy, and my job starter working continuously. It was like that the runtime were ignoring the cron expression, and started executing my job in an infinite loop.
Does this make any sense to any of you?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

最有可能的是你的工作抛出了异常,而不是优雅地完成,所以 Quartz 重新执行了它(一次又一次)。
Most likely your job was throwing an exception, rather than completing gracefully, so Quartz re-executed it (again, and again).