[GH-ISSUE #906] [Bug] Cron 允许非法表达式从而导致全部计划任务失效 #616

Closed
opened 2026-03-03 01:04:42 +03:00 by kerem · 0 comments
Owner

Originally created by @flashlab on GitHub (Aug 5, 2025).
Original GitHub issue: https://github.com/certimate-go/certimate/issues/906

软件版本 / Release Version

v0.3.26

缺陷描述 / Description

Cron 允许非法表达式从而导致全部计划任务失效

Image

复现步骤 / Steps to reproduce

  1. 按上图设置任意一项工作流的自动触发cron表达式
  2. 可以正常显示和保存
  3. 重启 certimate
  4. 命令行输出报错且所有自动触发任务失效,关键日志如下:

日志 / Logs

[0.00ms] SELECT `workflow`.* FROM `workflow` WHERE (`workflow`.`enabled` = 1 AND `workflow`.`trigger` = 'auto') ORDER BY `workflow`.`created` DESC
ERROR failed to init workflow scheduler
└─ {"err":"failed to add new cron job: strconv.Atoi: parsing \"Tue\": invalid syntax"}

其他 / Miscellaneous

看上去不允许“Tue”样式的表达式,但前端没有任何提示。可能与 #785 有关

贡献 / Contribution

  • 我乐意为此贡献 PR! / I am interested in contributing a PR for this!
Originally created by @flashlab on GitHub (Aug 5, 2025). Original GitHub issue: https://github.com/certimate-go/certimate/issues/906 ### 软件版本 / Release Version v0.3.26 ### 缺陷描述 / Description Cron 允许非法表达式从而导致全部计划任务失效 <img width="465" height="380" alt="Image" src="https://github.com/user-attachments/assets/e9aca04d-077a-4aed-931c-d35fd8d327e1" /> ### 复现步骤 / Steps to reproduce 1. 按上图设置任意一项工作流的自动触发cron表达式 2. 可以正常显示和保存 3. 重启 certimate 4. 命令行输出报错且所有自动触发任务失效,关键日志如下: ### 日志 / Logs <details> ```console [0.00ms] SELECT `workflow`.* FROM `workflow` WHERE (`workflow`.`enabled` = 1 AND `workflow`.`trigger` = 'auto') ORDER BY `workflow`.`created` DESC ERROR failed to init workflow scheduler └─ {"err":"failed to add new cron job: strconv.Atoi: parsing \"Tue\": invalid syntax"} ``` </details> ### 其他 / Miscellaneous 看上去不允许“Tue”样式的表达式,但前端没有任何提示。可能与 #785 有关 ### 贡献 / Contribution - [ ] 我乐意为此贡献 PR! / I am interested in contributing a PR for this!
kerem 2026-03-03 01:04:42 +03:00
  • closed this issue
  • added the
    bug
    label
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/certimate#616
No description provided.