Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,9 @@ dist

node_modules
dist
.DS_Store
.DS_Store

# Example persistence state files
examples/.cronbake-state.json
examples/cronbake-state.json
*.cronbake-state.json
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# cronbake

## 0.3.2

### Fixes

- Persistence: Fix job redefinition warning by allowing user-defined jobs to replace restored jobs without conflicts ([#14](https://github.com/chaqchase/cronbake/issues/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.

## 0.3.1

### Patch Changes
Expand Down
Loading