You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fixes
Persistence: Fix job redefinition warning by allowing user-defined jobs to replace restored jobs without conflicts (#14). Previously, restarting an app with updated job configurations would show a warning "Failed to restore job 'my-job': warn: Cron job with name 'my-job' already exists". Now, user-defined configurations take precedence over restored state.
Runtime: Failed job executions now bubble up properly so metrics/history and lastError reflect the failure, and onError handlers still fire exactly once.
Runtime: baker.lastExecution() uses the timestamp of the most recent actual run and Cron.time() once again reports the remaining delay rather than the current epoch time, matching the documented API.
Minor Changes
Persistence: Honor the persist flag per job so only opted-in jobs are saved/restored, and hydrate metrics/history snapshots during restore.
API: Added baker.ready() to await automatic restoration before interacting with jobs; autoStart now waits for persistence to finish.
DX: Prevent redundant persistence writes during restore for faster startups and fewer warnings.
Metadata: Point npm metadata to chaqchase/cronbake.
Docs: Added examples/ folder plus README guidance so common use cases have copy-paste starting points without bloating published bundles.