Skip to content

fix(schedule): give a recurring event of the laravel driver its interval - #477

Merged
ogorzalka merged 1 commit into
release/v13.36.0from
fix/laravel-driver-recurring-interval
Oct 14, 2026
Merged

ogorzalka merged 1 commit into
release/v13.36.0from
fix/laravel-driver-recurring-interval

Conversation

@ogorzalka

Copy link
Copy Markdown
Member

A recurring event placed with the laravel driver ran once and was then forgotten when the caller gave only the name of its recurrence, which is what the fluent API (Schedule::event('x')->hourly()) and #[Schedule] do. Only WordPress's own wp_schedule_event() also passes the interval.

LaravelQueueDriver::placeIdentified() sent the event as it was, so RunScheduledEvent::conclude() saw no interval and removed the entry instead of queuing the next occurrence. recurring() already looked the interval up from wp_get_schedules(); both paths now share withInterval().

Found live on a throwaway project on the release head (framework dev-release/v13.36.0, schedule 0.1.3, hook 2.0.0, Laravel 13.36.0): fluent API, a bare Event and a #[Schedule] in a theme did not come back after their first run; with the fix all three are queued again about an hour later (3586 s), like wp_schedule_event() and the Action Scheduler driver already did.

Test: a recurring event with no interval gets its job's interval and queues its next occurrence. Schedule tests 42 passed, PHPStan, Rector and Pint clean.

@ogorzalka
ogorzalka merged commit b628820 into release/v13.36.0 Oct 14, 2026
10 checks passed
@ogorzalka
ogorzalka deleted the fix/laravel-driver-recurring-interval branch October 14, 2026 08:33
@ogorzalka ogorzalka mentioned this pull request Oct 14, 2026
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