|
@@ -36,13 +36,11 @@ import org.apache.dolphinscheduler.dao.utils.DagHelper;
|
|
|
import org.apache.dolphinscheduler.dao.utils.cron.CronUtils;
|
|
|
import org.apache.dolphinscheduler.server.master.config.MasterConfig;
|
|
|
import org.apache.dolphinscheduler.server.utils.AlertManager;
|
|
|
-import org.quartz.CronExpression;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
|
import java.io.File;
|
|
|
import java.io.IOException;
|
|
|
-import java.text.ParseException;
|
|
|
import java.util.*;
|
|
|
import java.util.concurrent.ConcurrentHashMap;
|
|
|
import java.util.concurrent.ExecutorService;
|
|
@@ -215,15 +213,7 @@ public class MasterExecThread implements Runnable {
|
|
|
List<Date> listDate = Lists.newLinkedList();
|
|
|
if(!CollectionUtils.isEmpty(schedules)){
|
|
|
for (Schedule schedule : schedules) {
|
|
|
- CronExpression cronExpression = null;
|
|
|
- try {
|
|
|
- cronExpression = CronUtils.parse2CronExpression(schedule.getCrontab());
|
|
|
- List<Date> list = CronUtils.getSelfFireDateList(startDate, endDate, cronExpression);
|
|
|
- listDate.addAll(list);
|
|
|
- } catch (ParseException e) {
|
|
|
- logger.error(e.getMessage(), e);
|
|
|
- continue;
|
|
|
- }
|
|
|
+ listDate.addAll(CronUtils.getSelfFireDateList(startDate, endDate, schedule.getCrontab()));
|
|
|
}
|
|
|
}
|
|
|
// get first fire date
|