我對計劃任務有一個奇怪的行爲。我有以下設置春天的計劃任務沒有在Windows 7上執行
<task:scheduled-tasks>
<task:scheduled ref="servicioEjecucionReportes" method="ejecutar" cron="0 0 * * * *" />
<task:scheduled ref="servicioEjecucionReportes" method="ejecutarReintentos" cron="0 30 * * * *" />
<task:scheduled ref="servicioEjecucionReportes" method="enviarReporteDiario" cron="0 15 0 * * *" />
</task:scheduled-tasks>
而執行這種方式配置:
<task:annotation-driven executor="asyncExecutor" scheduler="taskScheduler" />
<task:executor id="asyncExecutor" rejection-policy="CALLER_RUNS" pool-size="16" />
<task:scheduler id="taskScheduler" pool-size="8" />
的事情是,我們正在使用Linux和Mac OS和三個任務發展得到執行正確,但在Windows 7 Server的部署服務器上,前兩個正確執行,第三個不正確。
我需要第三個任務在每天00:15執行。
我試過更改配置,但行爲總是相同的,在開發和測試環境中一切正常,但不在生產環境中。
我有點失落在哪裏看或什麼是錯的。
bean的聲明如下:
<bean id="servicioEjecucionReportes" class="com.mycompany.beans.ServicioEjecucionReportesImpl" />
和接口是:
public interface ServicioEjecucionReportes {
public void ejecutar();
public void ejecutarReintentos();
public void enviarReporteDiario();
}
編輯:額外的信息,對我們沒有看到甚至嘗試運行,該任務的服務器日誌春天的版本是3.1.0。
再次,這是炒作,但你可以只嘗試刪除拒絕策略?或將其更改爲「DISCARD_OLDEST」? –