diff --git a/backend/src/main/resources/db/migration/V1.0.1__init_data.sql b/backend/src/main/resources/db/migration/V1.0.1__init_data.sql index a3aef1ef..e9bffe25 100644 --- a/backend/src/main/resources/db/migration/V1.0.1__init_data.sql +++ b/backend/src/main/resources/db/migration/V1.0.1__init_data.sql @@ -427,8 +427,9 @@ true, NOW(), 'system', NOW(), 'system', 1, false), "cron": { "type": "string", "title": "CRON表达式", - "pattern": "^(\\d+|\\*|\\*/\\d+|\\d+\\-\\d+|\\d+(,\\d+)*) (\\d+|\\*|\\*/\\d+|\\d+\\-\\d+|\\d+(,\\d+)*) (\\d+|\\*|\\*/\\d+|\\d+\\-\\d+|\\d+(,\\d+)*) (\\d+|\\*|\\*/\\d+|\\d+\\-\\d+|\\d+(,\\d+)*) (\\d+|\\*|\\*/\\d+|\\d+\\-\\d+|\\d+(,\\d+)*) (\\d+|\\*|\\*/\\d+|\\d+\\-\\d+|\\d+(,\\d+)*)$", - "description": "定时触发的CRON表达式" + "description": "定时触发的CRON表达式(秒 分 时 日 月 周)", + "pattern": "^\\s*($|[0-9\\-*/,]+\\s+[0-9\\-*/,]+\\s+[0-9\\-*/,]+\\s+[0-9\\-*/,]+\\s+[0-9\\-*/,]+\\s+[0-9\\-*/,?]+)\\s*$", + "examples": ["0 0 * * * ?", "0 0/5 * * * ?", "0 0 8 * * ?"] } }, "required": ["name", "cron"]