Commit 582e6af5 by huangfusuper

..

parent 1ab2e0d0
......@@ -101,7 +101,8 @@ public class RunNodeServiceImpl implements RunNodeServer, ApplicationEventPublis
jobTaskService.saveJobTasks(jobTasks);
log.info("-------------【开始修改工作流{}的下次运行时间,以及各种状态】---------------",flow);
try {
flow.setTriggerNextTime(new CronExpression(flow.getFlowCron()).getNextValidTimeAfter(new Date(flow.getTriggerNextTime())).getTime());
Long triggerNextTime = flow.getTriggerNextTime();
flow.setTriggerNextTime(new CronExpression(flow.getFlowCron()).getNextValidTimeAfter(new Date(triggerNextTime)).getTime());
} catch (ParseException e) {
flow.setTriggerNextTime(999999999999999999L);
......
package com.byit.util;
import com.byit.enums.NodeTypeEnum;
import com.byit.job.utils.CronExpression;
import com.byit.model.Flow;
import com.byit.model.Node;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
......@@ -68,4 +71,8 @@ public class FlowInitUtil {
return nodeList;
}
public static void main(String[] args) throws ParseException {
long time = new CronExpression("0 59 09 ? * 2 *").getNextValidTimeAfter(new Date(1593395940000L)).getTime();
System.out.println(time);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment