Files
nocobase/packages
Eliauk 2f82cf8a26 fix(workflow): avoid extra trigger at startsOn for cron based schedule (#10410)
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>
2026-08-25 21:34:01 +08:00
..
2026-08-23 17:34:21 +00:00