Skip to content

v0.3.2

Choose a tag to compare

@github-actions github-actions released this 15 Nov 03:45
· 9 commits to main since this release
c91a906

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.