diff --git a/thain-server/src/main/java/com/xiaomi/thain/server/controller/x5/X5FlowController.java b/thain-server/src/main/java/com/xiaomi/thain/server/controller/x5/X5FlowController.java index cccb85b9..8f516ca4 100644 --- a/thain-server/src/main/java/com/xiaomi/thain/server/controller/x5/X5FlowController.java +++ b/thain-server/src/main/java/com/xiaomi/thain/server/controller/x5/X5FlowController.java @@ -118,10 +118,10 @@ public ApiResult schedule(@NonNull @RequestBody String json, @NonNull String app if (!permissionService.getFlowAccessible(flowId, appId)) { return ApiResult.fail(NO_PERMISSION_MESSAGE); } - if (StringUtils.isBlank(cron)) { - flowService.scheduling(flowId); + if (StringUtils.isNotBlank(cron)) { + flowService.updateCron(flowId, cron); } - flowService.updateCron(flowId, cron); + flowService.scheduling(flowId); } catch (Exception e) { log.error("scheduling:", e); return ApiResult.fail(e.getMessage());