diff --git a/src/main/java/net/geedge/asw/module/job/service/impl/JobCfgServiceImpl.java b/src/main/java/net/geedge/asw/module/job/service/impl/JobCfgServiceImpl.java index 6031fcc..ee3d36d 100644 --- a/src/main/java/net/geedge/asw/module/job/service/impl/JobCfgServiceImpl.java +++ b/src/main/java/net/geedge/asw/module/job/service/impl/JobCfgServiceImpl.java @@ -121,7 +121,7 @@ public class JobCfgServiceImpl extends ServiceImpl impl if (T.StrUtil.equals(cfg.getType(), "cron") && cfg.getCron() == null) { throw new ASWException(RCode.JOB_CFG_CRON_CANNOT_EMPTY); } - if (cfg.getCron() != null && !CronExpression.isValidExpression(cfg.getCron())) { + if (T.StrUtil.isNotEmpty(cfg.getCron()) && !CronExpression.isValidExpression(cfg.getCron())) { throw new ASWException(RCode.JOB_CFG_CRON_ERROR); }