docs: fix cron examples that put the seconds field first - #48
Merged
Conversation
Ten examples across the concepts, config and plugin pages were written as if a cron expression took seconds as its first field. The generator takes them after the weekday, so each ran a different schedule than its comment claimed - "every 5 seconds" fired every second during minutes divisible by 5, the 50-event burst landed once every 5 hours, and the business-hours example was rejected outright. Rewrite them in the engine's order. Refs eventum-generator/eventum#187 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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 eventum-generator/eventum#187.
Ten examples were written as if a cron expression took seconds as its first field. The generator takes them after the weekday, so each one ran a different schedule than its comment claimed. Every replacement below was checked against croniter, the parser the
croninput plugin uses.core/concepts/scheduling.mdx* * 9-17 * * MON-FRI* 9-17 * * MON-FRI *core/concepts/scheduling.mdx0 */5 * * * **/5 * * * * 0core/concepts/scheduling.mdx*/10 * 0-8,18-23 * * ** 0-8,18-23 * * * */10core/concepts/plugins.mdx*/5 * * * * ** * * * * */5core/concepts/plugins.mdx0 * * * * ** * * * *core/config/generator-yml.mdx*/10 * * * * ** * * * * */10core/introduction/features.mdx*/5 * * * * ** * * * * */5plugins/event/replay.mdx*/5 * * * * ** * * * * */5# every 5 secondscommentplugins/event/script.mdx*/5 * * * * ** * * * * */5regulartick every 5 secondsplugins/event/script.mdx*/2 * * * * ** * * * * */2# a request every 2 secondscommenttutorials/telegram-alerts.mdxcarries the same mistake ondevelopbut is left alone here: the learning-course branch (#45) has a newer version of that page and already fixes it in 6e5cacb.Only the expressions changed - comments and prose around them were already describing the intended schedule, and they now match.
* * * * * *examples elsewhere in the docs mean "every second" under either reading and needed no change; content-pack generators use only that form.pnpm buildpasses.Follows #46, which corrected the field-order table in the cron reference.