-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
php artisan schedule:list
does not support fluent-style scheduling
#50670
Comments
Are you saying it doesn't run between 7:00 - 22:00 hourly every day. Or does the CLI output does not match your expectations but the schedule still executed correctly? |
I did not test if it runs or not according to the schedule, but people in the Laracasts forum claim that:
So this issue is about |
I tested it and I confirm that the |
Thank you for reporting this issue! As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub. If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team. Thank you! |
Sorry I closed your previous issue @raveren. Would love to get some help with this one. |
No problem, totally understandable, however I think @JonPurvis, the author of #47983 knows this stuff best, however his PR was denied by @taylorotwell for reasons I couldn't fully understand. Anyway me personally, I am out of my depth here, I've never did anything in Laravel internals at this point I and am frankly out of motivation to take this one up, as I accidentally lost the huge real-life schedule file that took me all evening to convert from cron to fluent-calls. I couldn't verify I did no unintended changes and eventually lost the change :) |
I actually forgot I'd worked on that until I got the GitHub notification for the mention on this issue 😆 #47983 should fix this issue though. I could try tagging Taylor for a re-review of it and see what he says? |
@JonPurvis Ideally, we should try to fix this issue without touching on the generation of the cron expression. |
Yep of course, would be awesome to get this sorted somehow! |
@JonPurvis would you mind sending your PR to 11.x and we can take another look? |
The $schedule->command('...')->when(fn () => Birthday::existsOnDate(today())); |
Coming from #51107, can confirm that |
Fix the between method and unlessBetween method of Event so that schedule:list is displayed correctly
@JonPurvis would you maybe be up for re-attempting your PR against master/12.x? Maybe we can make it happen on a next release. |
Hey @driesvints Certainly, I actually meant to do this when Taylor tagged me but it slipped my mind. I'll re-create this PR targeted to Laravel 12 this week so I don't forget! I believe it's still worth looking into. |
Going to close this one now as non-supported but happy to receive a new attempt at 12.x, thanks. |
Laravel Version
11.0.7
PHP Version
8.3.4
Database Driver & Version
No response
Description
As found out in #50120 - the
php artisan schedule:list
is broken for fluent-style scheduling entries.The scheduling still works as expected, but the list is displayed incorrectly.
Using the example from the docs (https://laravel.com/docs/11.x/scheduling#between-time-constraints):
php artisan schedule:list
:As you can see the configuration is displayed as a seemingly random value, in this case just
hourly
.Related Laracasts topic:
https://laracasts.com/discuss/channels/laravel/schedule-between-not-working-as-expected
Steps To Reproduce
add
to
routes/console.php
and launchThe text was updated successfully, but these errors were encountered: