Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[13.x] Allow scheduler to opt out of pause and interrupt cache checks#60226

Draft
jackbayliss wants to merge 3 commits into
laravel:13.xfrom
jackbayliss:13.x-schedule-opt-out
Draft

[13.x] Allow scheduler to opt out of pause and interrupt cache checks#60226
jackbayliss wants to merge 3 commits into
laravel:13.xfrom
jackbayliss:13.x-schedule-opt-out

Conversation

@jackbayliss
Copy link
Copy Markdown
Contributor

@jackbayliss jackbayliss commented May 21, 2026

The Worker class allows you to opt out of the cache checks, this would also nice for the scheduler.

This works for schedule;work, and schedule:run commands (work basically calls run)

This is particularly useful foreveryXSeconds calls, where you get a considerable amount of cache hits.. and even more useful the more servers you have.

This PR gives you the ability to turn them off independently, or as a whole:

// Independently
Schedule::$pausable  = false
Schedule::$interruptible = false


// Completely.
Schedule::withoutInterruptionPolling();

I went with the Schedule class cause it makes the most sense discoverability wise in my head.

I've tried to align it with the Worker, but feel free to jazz it up.

This is still useful in general even if you're not using the Second events to avoid the cache hit if you're not using the features.

I'm just trying to make everything as efficient as I can atm 🫖

@github-actions
Copy link
Copy Markdown

Thanks for submitting a PR!

Note that draft PRs are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface.

Pull requests that are abandoned in draft may be closed due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant