我用@Scheduled
註釋,使功能myProcess()
在Spring MVC應用程序(版本3.0.6.RELEASE運行在Apache Tomcat/7.0.26)運行每小時一次( 3600000毫秒= 1小時):按預期執行春3.0 @Scheduled註釋工作不正常
@Scheduled(fixedRate = 3600000)
public void myProcess() { ... }
功能,但不是在清晨(見下文最近2天后該樣品日誌時間)。這每天都會發生。我在日誌文件中看不到任何例外。你有什麼想法可能是這種奇怪行爲的原因嗎?
Feb 13 02:11:15
Feb 13 03:11:16
Feb 13 06:17:34
Feb 13 06:45:55
Feb 13 07:03:22
Feb 13 07:31:57
Feb 13 08:11:16
Feb 13 09:11:18
Feb 13 10:11:18
Feb 13 11:11:28
Feb 14 01:11:37
Feb 14 02:11:29
Feb 14 03:11:29
Feb 14 06:19:51
Feb 14 06:49:17
Feb 14 07:35:57
Feb 14 08:11:29
Feb 14 09:11:35
您使用的是哪個版本的Spring? – sp00m 2013-02-15 08:20:50
@ sp00m:謝謝,Spring版本是3.0.6.RELEASE。我用這個信息更新了這個問題。 – Gruber 2013-02-15 08:34:34