schedule_task:description补时区/最小间隔语义/输出归属契约(评审#1#4);cron校验错误回显输入(评审#3);list工具不加(查重错已含回显+指引)

This commit is contained in:
2026-09-22 22:36:19 +08:00
parent 572107ac2b
commit 290527d2b7
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -41,9 +41,9 @@ function validateCron(cronExpr) {
first = it.next().getTime();
second = it.next().getTime();
} catch (e) {
throw new Error('cron 表达式无效: ' + (e && e.message || e));
throw new Error('cron 表达式无效: ' + cronExpr + ' → ' + (e && e.message || e));
}
if (second - first < MIN_INTERVAL_MS) throw new Error('定时任务间隔不能小于 1 小时');
if (second - first < MIN_INTERVAL_MS) throw new Error('定时任务间隔不能小于 1 小时:' + cronExpr + ' 相邻两次触发不足 1h');
return first;
}