Skip to content

Commit

Permalink
chore[comment]: scheduler comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysunxiao committed Jan 20, 2024
1 parent c263ed6 commit 7a008db
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,10 @@ private static void triggerPerSecond() {
// 到达触发时间,则执行runnable方法
try {
scheduler.getScheduler().invoke();
} catch (Exception e) {
logger.error("scheduler invoke exception", e);
} catch (Throwable t) {
logger.error("scheduler任务调度未知异常", t);
logger.error("scheduler invoke error", t);
}
// 重新设置下一次的触发时间戳
triggerTimestamp = TimeUtils.nextTimestampByCronExpression(scheduler.getCronExpression(), timestampZonedDataTime);
Expand Down Expand Up @@ -175,7 +177,7 @@ public static ScheduledFuture<?> scheduleAtFixedRate(Runnable runnable, long per
*/
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);
}

/**
Expand Down

0 comments on commit 7a008db

Please sign in to comment.