Repository navigation
Implement in-process callback-style Bun.cron #28701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 17 commits
Commits
Show all changes
61 commits
Select commit
Hold shift + click to select a range
6b0b814
Implement in-process callback-style Bun.cron (#7004)
alii 6a64dbc
[autofix.ci] apply automated fixes
autofix-ci[bot] be14e09
Fix JSDoc comment — escape */ in cron expression example
alii 436a4d5
Match setTimeout error semantics for cron callbacks
alii dc34784
Address review feedback: per-VM job map, validate before replace
alii 1d8acc8
Fix JSDoc example: use absolute URL in fetch
alii e7422f0
Add CronJob._fire() to make firing tests instant
alii da3d51f
Revert "Add CronJob._fire() to make firing tests instant"
alii a877424
make it disposable also always clear on --hot and remove the requirem…
alii b885965
Address review feedback and simplify CronJob
alii 62f3b9c
Use Promise.withResolvers in cron firing tests
alii 5d70794
Clear cron jobs on worker termination; deterministic --hot test
alii f85aca1
Anchor cron to real time; suppress rejection for stopped jobs
alii ec0d8ee
Move cron jobs list to per-VM RareData
alii 520ff90
Address review: ref/deref bracket in onTimerFire, pass job as this
alii 8246306
Exclude CronJob from fake timers; release callback on stop; bun.Strin…
alii cb6adce
docs: add in-process Bun.cron(schedule, handler) section
alii f71fc85
Store callback and pendingPromise as WriteBarrier values, rename poll…
alii 080ccc3
Support fake timers in Bun.cron; address Jarred review
alii 56a6d21
Surface rejections after stop; free cron_jobs buffer in RareData.deinit
alii 789f3cb
Reset date_now_offset when setSystemTime() is called with no args
alii 4807d6c
[autofix.ci] apply automated fixes
autofix-ci[bot] 46db234
Inline single-use helpers in CronJob and trim narrative comments
alii 8aa7e88
Revert fake-timer support for cron; balance pending ref on VM teardown
alii 188aedd
Defer this_value downgrade until pending promise settles
alii fcdd580
Test: drop reference + GC before reject to verify wrapper stays strong
alii de04dc8
Defer stop() cleanup when called during cb.call()
alii d19ce67
Unref poll_ref immediately in deferred-stop path
alii 1641875
cron: interpret schedules in local time instead of UTC
alii ca0f099
docs: clarify spring-forward DST skips to next occurrence
alii c0ae5e8
Fix stray UTC reference in cron_parser module comment
alii 282b60b
cron_parser: guard against fall-back returning a time before from_ms
alii fb7a836
Use describe.concurrent for cron-local-time subprocess tests
alii 4efefa5
Merge branch 'main' into ali/in-process-cron
alii 79f99cb
cron_parser: spring-forward fires same day; selfStop defers when pend…
alii 397186b
Reword noon round-trip comment: midday DST shifts stay same calendar day
alii aac6816
scheduleNext: use finishDeferredStop on natural-expiry; fix month/wee…
alii e651c78
cron: relax handler return type to unknown
alii 2e7453d
cron: fix Windows OS-level leaks (stderr_reader, envp arena)
alii 91061fa
cron_parser: fold weekday 7→0 after range expansion, not before
alii b60a308
cron: address deep-review findings
alii b297206
cron: fall-back wild schedules fire through repeated hour (cronie sem…
alii ef368f6
cron: simplify — extract matchesDay, dedupe all_* constants, name sca…
alii 7d659e5
[autofix.ci] apply automated fixes
autofix-ci[bot] 143420b
cron: deep-simplify — handleOom ladders, merge C++ date externs, fix …
alii 97b8a59
cron: --hot test writes markers outside watched dir (avoid watcher/ex…
alii 6a9b1d6
cron_parser: hoist year bound into loop condition
alii 3e0005e
cron: fix WindowsBufferedReader.deinit pipe leak; clearAllForVM in ma…
alii 7b64fa6
cron_parser: drop date_dirty — noon round-trip is cheap (dateCache), …
alii 9b4ab11
cron_parser: extract resolveLocalMatch — next() is now purely the wal…
alii 3a61b3b
cron: add Lord Howe 30-min fall-back tests + hourly chain tests throu…
alii b9415aa
cron: parse() and in-process callback are UTC; drop local-time/DST ha…
alii 61b1f24
cron: remove dead raw_schedule field
alii 3bb7e12
Merge branch 'main' into ali/in-process-cron
alii 3ed45d0
cron: skip cron_jobs list ref+append when not --hot and not a worker
alii 892a093
cron: drop stale TZ-pinning in cron.test.ts; remove duplicate "may" i…
alii 2b384d5
[autofix.ci] apply automated fixes
autofix-ci[bot] cb9abd1
cron: validate bun_exe path for ' and % before crontab embed
alii 647c66f
Merge branch 'main' into ali/in-process-cron
alii a9b5e5a
Revert PipeReader.zig deinit reorder; fail-fast --hot test polls; bum…
alii e5a57b8
cron.test.ts: poll for marker instead of fs.watch(/tmp) (macOS symlin…
alii File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.