-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
Scheduled ->everyMinute() task is running twice per minute #435
Comments
We had another community member ask us about this today (@fouteox). He mentioned it was happening in our Docker images and in Laravel Herd, so this issue could be related to the framework. Maybe chime in on that and see if you can help the Laravel Community get it replicated and a fix in place? If it's possible to eliminate our Docker Images from the equation, that will help clarify if it's truly a Laravel issue. |
"If it's possible to eliminate our Docker Images from the equation, that will help clarify if it's truly a Laravel issue." , agreed, I always feel a bit guilty reporting it here, as I can't tell where the issue lies, and it may very well be with the framework. I'll see what I can cook up to clear your good name and pin it on Laravel :) |
Never have shame opening an issue! Always great to have you around the community 👍 |
Probably related to laravel/framework#52867 ? |
Very well could be! I know @fouteox mentioned he locked into Laravel Version Maybe try that and see if that works? |
A new version of Laravel is out (11.25.0). According to @fouteox this should fix the issue: https://github.com/laravel/framework/releases/tag/v11.25.0 |
I can confirm this fixes the double scheduled job run when using schedule:work . Thanks for letting me know about the Laravel update, Jay, I appreciate it. |
Sweet! Thanks for the update 👍 |
Steps To Reproduce
Install a brand-new copy of Laravel in a new test directory
Change contents of routes/console.php to:
In Docker Desktop, run the test_scheduled image
Observe the log of the container
Observations
The Container log file shows the first callback run in a few milliseconds, and the second run in 100ths of a millisecond, as if the same PHP process is running the second closure call quickly, as it has already been loaded into memory/bytecode.
I built the Dockerfile with procps in it:
and "ps ax" shows:
Outcome
I expect the scheduled closure to run once per minute.
The scheduled closure runs twice per minute.
Affected Docker Images
serversideup/php:8.3-cli
Anything else?
No response
The text was updated successfully, but these errors were encountered: