Repository navigation
Conversation
english-to-cron writes steps as `0/N` ("every 8 hours" becomes
`0 0 0/8 * * ?`), and croner 4 rejects that form unless sloppy ranges
are enabled, so every English step schedule failed to parse after 2.3.3.
Enable sloppy ranges on the shared parser, which also restores CRON
schedules written the same way.
Fixes moghtech#1616
Merged
2 of 5 tasks
LoganRupe
added a commit
to LoganRupe/quomodo
that referenced
this pull request
Oct 22, 2026
…arse (#36) ## What and why Any English schedule with a step, like "every 8 hours" or "every 15 seconds", fails with `English expression produced invalid CRON schedule`. english-to-cron writes steps as `0/N`, and croner 4 rejects that form unless sloppy ranges are on. This turns them on for the shared parser, so hand-written `0/N` CRON schedules work again too. Ported from upstream komodo [#1661](moghtech/komodo#1661) by @manduinca, which fixes [#1616](moghtech/komodo#1616). The new test fails without the change. ## Checks - [x] `cargo fmt --all -- --check`, `cargo clippy --workspace -- -D warnings` and `cargo test --workspace` pass (CI runs these too) - [ ] Touches deploys, the agent, secrets, Alerters or ResourceSync: `scripts/e2e.sh` passes (not in CI). N/A, schedules only - [ ] Changes API types: regenerated `client/core/ts/src/types.ts`, `ui/public/client` and `ui/public/schema/resources.json` (see AGENTS.md). N/A - [ ] User-visible change: `docs/` updated. N/A, restores documented behaviour - [x] No secrets, real hostnames or personal emails in code, fixtures or commit messages
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1616
english-to-cron writes every step as
0/N: "every 8 hours" becomes0 0 0/8 * * ? *, "every 15 seconds" becomes0/15 * * * * ? *. Since 2.3.3 the sharedCronParseris built on croner 4, which rejects that form by default ("Stricter Step Syntax Validation" in the croner 4.0.0 notes, as @xaviermarchegay found), so every English schedule with a step fails withEnglish expression produced invalid CRON schedule.This enables
sloppy_ranges(true)on the parser, croner's documented switch for the old behaviour. With it,0/8in the hours field reads as 0-23/8 again, the same 00:00, 08:00 and 16:00 cadence the reporter had before the update. Since the parser is shared, CRON schedules written as0/Nby hand work again too.I added a small test module in
schedule.rs:english_step_schedules_parse: "every 15 seconds", "every 5 minutes" and "every 8 hours", run through english-to-cron and trimmed to six fields asfind_next_occurrencedoes, all parse.every_8_hours_runs_at_0_8_16: starting at 01:00, the next three runs are 08:00, 16:00 and 00:00.cron_step_shortcut_parses:0 0 0/6 * * *parses.All three fail on
mainand pass with the change.cargo fmt --all -- --checkis clean.It targets
mainbecause there is no 2.3.4 branch yet; it can move to the release branch once there is one.