Wilflfy时间表重叠

问题描述 投票:0回答:1

我在WildFly 9中使用带有此EJB的调度程序:

import javax.ejb.Singleton;
import javax.ejb.Startup;
import javax.ejb.Schedule;

我收到了这些警告:

2020-01-21 12:35:59,000 WARN  [org.jboss.as.ejb3] (EJB default - 6) WFLYEJB0043: A previous execution of timer [id=3e4ec2d2-cea9-43c2-8e80-e4e66593dc31 timedObjectId=FiloJobScheduler.FiloJobScheduler.FiskaldatenScheduler auto-timer?:true persistent?:false timerService=org.jboss.as.ejb3.timerservice.TimerServiceImpl@71518cd4 initialExpiration=null intervalDuration(in milli sec)=0 nextExpiration=Tue Jan 21 12:35:59 GMT+02:00 2020 timerState=IN_TIMEOUT info=null] is still in progress, skipping this overlapping scheduled execution at: Tue Jan 21 12:35:59 GMT+02:00 2020.

但是当我测量经过的时间时,它们总是小于1分钟。计划为:

@Schedule(second = "*", minute = "*/5", hour = "*", persistent = false)

有人知道发生了什么吗?

scheduled-tasks wildfly java-ee-7
1个回答
0
投票

进行一些记录将对您有所帮助。这每秒运行一次,因为这就是您要告诉它与second="*"部分一起执行的操作。如果您只想每小时运行一次,每5分钟运行一次,请将时间表更改为:

@Schedule(minute = "*/5", hour="*", persistent = false)
© www.soinside.com 2019 - 2024. All rights reserved.