[6.x] Add config to disable HandleEntrySchedule job - #15103
Merged
Conversation
Allows the `HandleEntrySchedule` scheduled task to be disabled, so sites on usage-billed serverless infrastructure aren't kept awake every minute. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
HandleEntrySchedule job
Contributor
|
Lovely gents! |
duncanmcclean
added a commit
to statamic/docs
that referenced
this pull request
Aug 6, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request adds a
handle_scheduled_entriesconfig option, which allows theHandleEntrySchedulescheduled task to be disabled.Statamic registers this scheduled job unconditionally, and runs it every minute:
It's fine on traditional hosting, but becomes a problem on usage-billed platforms (like Laravel Cloud or Vapor) as it means the application's resources need to boot every 60 seconds to run the job, whether or not the site has a single scheduled entry.
This PR adds a config option so those sites can opt out:
Disabling the job won't prevent entries from being published on time.
Entry::status()derivesscheduledfrom the entry's date on every read, so an entry goes live either way. The job only dispatchesEntryScheduleReached, which invalidates the static cache and updates search indexes — so what you lose is those two staying in sync until something else touches the entry.The original request asked for a configurable frequency rather than an on/off switch. I've gone with a boolean because the two aren't equivalent —
MinuteEntrieslooks at exactly one minute, so running the task every fifteen minutes would skip fourteen of them rather than publishing late. Supporting a frequency means reworking the job to sweep the whole elapsed interval and persist its last run, which felt like more than this needed. A boolean can widen to accept a frequency later without a breaking change.Closes statamic/ideas#1476