mirror of
https://github.com/nocobase/nocobase.git
synced 2026-08-31 01:00:12 +08:00
2f82cf8a26
When a static schedule workflow repeats on a cron expression, getNextTime() returned `startTime` as soon as `startsOn` was in the future, without ever consulting `repeat`. The workflow therefore fired once at `startsOn` even when that moment did not match the expression, and only followed the cron afterwards. That shortcut is correct for a numeric `repeat`, where the period is `startsOn + n * repeat` and `startsOn` is occurrence #0, so it is now limited to the non-cron cases. For a cron string the next match is computed from `startsOn` instead of "now", stepping back one second so that a `startsOn` which does match the expression still triggers. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>