mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-17 12:16:26 +00:00
chore[comment]: scheduler comments
This commit is contained in:
1 parent
c263ed6173
commit
7a008dbcc7
1 file changed
+4
-2
@@ -141,8 +141,10 @@ public abstract class SchedulerBus {
|
|||||||
// 到达触发时间,则执行runnable方法
|
// 到达触发时间,则执行runnable方法
|
||||||
try {
|
try {
|
||||||
scheduler.getScheduler().invoke();
|
scheduler.getScheduler().invoke();
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("scheduler invoke exception", e);
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
logger.error("scheduler任务调度未知异常", t);
|
logger.error("scheduler invoke error", t);
|
||||||
}
|
}
|
||||||
// 重新设置下一次的触发时间戳
|
// 重新设置下一次的触发时间戳
|
||||||
triggerTimestamp = TimeUtils.nextTimestampByCronExpression(scheduler.getCronExpression(), timestampZonedDataTime);
|
triggerTimestamp = TimeUtils.nextTimestampByCronExpression(scheduler.getCronExpression(), timestampZonedDataTime);
|
||||||
@@ -175,7 +177,7 @@ public abstract class SchedulerBus {
|
|||||||
*/
|
*/
|
||||||
public static ScheduledFuture<?> schedule(Runnable runnable, long delay, TimeUnit unit) {
|
public static ScheduledFuture<?> schedule(Runnable runnable, long delay, TimeUnit unit) {
|
||||||
|
|
||||||
return executor.schedule(ThreadUtils.safeRunnable(runnable), delay, unit);
|
return executor.schedule(ThreadUtils.safeRunnable(runnable), delay, unit);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in new issue
Block a user