Schedule group when()
issue
#53608
Unanswered
rcerljenko
asked this question in
Q&A
Replies: 3 comments 4 replies
-
hi @istiak-tridip, could you take a look please |
Beta Was this translation helpful? Give feedback.
1 reply
-
ok i figured out what's the catch... please reorder the inner and outer commands like so: Schedule::daily()
->group(static function (ConsoleSchedule $schedule): void {
$schedule->command('command-outer');
$schedule->when(static fn (): bool => true)
->group(static function (ConsoleSchedule $schedule): void {
$schedule->command('command-inner');
});
}); |
Beta Was this translation helpful? Give feedback.
2 replies
-
Hey @rcerljenko I've opened a PR #53626 to fix this issue. Please check and provide feedback. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Laravel Version
11.33.2
PHP Version
8.3
Database Driver & Version
No response
Description
First of all, I'm not sure if this is a issue with a
when()
function or agroup()
function but it happens after schedulegroup()
comes after awhen()
.Consider this piece of code:
All schedules should have the same cron expression (
0 0 * * *
) but, as it turns out, the inner group underwhen
condition has a cron expression which triggers on every minute (* * * * *
) and the outer group has the right one.Something happens with the
when -> group
combo with cron definitions.Steps To Reproduce
Beta Was this translation helpful? Give feedback.
All reactions