-
Notifications
You must be signed in to change notification settings - Fork 11.3k
"Scheduled command ['/usr/local/bin/php' 'artisan' xxx] failed with exit code []." #55609
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
Comments
I see two possible solutions: I think the first one makes more sense, since checks inside the Event class are also strict. |
@alexey-m-ukolov join the conversation here,#55605 this PR i addressing the issue above |
@alexey-m-ukolov exactly that's why I used strict comparison. @tarkis already created a solution with "1. Move assignment from finish() to run()." |
Oh, thanks! I was using search on issues and didn't find anything so created this one. Next time will check PRs also 😄 |
Then maybe this comparison also should be made strict? But that would be a breaking change imo. |
@alexey-m-ukolov I think it needs more testing testing and can be simplified to :
|
The main difference that I see is that current version handles any exceptions (presumably thrown from within |
@alexey-m-ukolov yes you are right the Event Start() function throws exception that need handeling so should be more like this :
|
Since original PR was reverted in 12.11.1, issue can be closed. |
Laravel Version
12.11.0
PHP Version
8.4.2
Database Driver & Version
No response
Description
#55572 introduced a new check on
Illuminate\Console\Scheduling\Event::exitCode
.But this property is set only when
runInBackground
flag isfalse
. Otherwise it is alwaysnull
which now is getting compared to zero strictly, unlike the next check in the same function.Steps To Reproduce
Schedule any console command with
->runInBackground()
and wait for it to run, then check logs.The text was updated successfully, but these errors were encountered: