New features and improvements#8
Merged
Merged
Conversation
…layed first run, overrun protection, and pluggable persistence providers
…iate/delayed first run and overrun protection examples
This was referenced Sep 3, 2025
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.
This pull request introduces several new features and improvements to the cronbake package, focusing on enhanced scheduling controls, robust overrun protection, and a pluggable persistence system. It also updates documentation, fixes cron parsing and type issues, and improves packaging and public API surface.
Major features and improvements:
Scheduling Controls & Overrun Protection
immediateanddelayoptions to allow the first cron callback to run immediately or after a configurable delay. IntroducedoverrunProtection(default: true) to prevent overlapping executions if a previous run is still in progress. These features are now documented and available in both the API and README usage examples. [1] [2] [3] F1ca759aL4R4, [4] [5]Persistence System
FilePersistenceProvider(JSON on disk) andRedisPersistenceProvider(single-key JSON via injected client). The persistence system now uses a provider interface, and the public API exports these providers for external use. Documentation and usage examples in the README have been updated accordingly. [1] [2] [3] [4] [5] [6]Cron Expression & Type Fixes
@on_<day>, fixes for@every_<n>_monthsand@every_<n>_dayOfWeek, and replaced the customTimertype withReturnType<typeof setTimeout|setInterval>for better portability. [1] [2] [3] [4] [5]Documentation & Examples
skippedExecutions) and clarified persistence options. [1] F1ca759aL4R4, [2] [3] [4]Packaging & Public API
restrictedtopublicand fixed build issues by replacing path aliases (@/lib) with relative imports. Ensured new persistence providers and types are exported from the main API. [1] [2] [3] [4]These changes collectively make cronbake more flexible, robust, and easier to integrate with various persistence backends, while improving reliability and developer experience.