AlbertYang0801 commented on code in PR #3777:
URL: https://github.com/apache/hertzbeat/pull/3777#discussion_r2363518684
##########
hertzbeat-collector/hertzbeat-collector-common/src/main/java/org/apache/hertzbeat/collector/timer/TimerDispatcher.java:
##########
@@ -153,9 +166,36 @@ public void responseSyncJobData(long jobId,
List<CollectRep.MetricsData> metrics
eventListener.response(metricsDataTemps);
}
}
-
+
@Override
public void destroy() throws Exception {
this.wheelTimer.stop();
}
+
+ public Long getNextExecutionInterval(Job job) {
+ if (ScheduleTypeEnum.CRON.getType().equals(job.getScheduleType()) &&
job.getCronExpression() != null && !job.getCronExpression().isEmpty()) {
+ try {
+ CronExpression cronExpression = new
CronExpression(job.getCronExpression());
Review Comment:
Thanks! Already done. Removed Quartz and replaced it with Spring's built-in
CronExpression parser. Keeps the same cron format but cleans up the
dependencies.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]