Closed istiak-tridip closed 9 hours ago
I have no idea where you find the things in the framework that need fixing but you seem to be pushing out some ace work recently. 🔥
Hey @istiak-tridip ...
For the first situation, I would catch the fatal exception and throw an informative error message.
For the second situation, I think the expression would reset to hourly so that you could in theory group a bunch of tasks but opt out to some custom customization for a scheduled task when you need to.
Description
This PR resolves a bug in which the attributes of the parent schedule group were not applied to the nested group's events. @rcerljenko reported the issue in #53608.
Example of unexpected behavior:
P.S.
While debugging, I encountered two behaviors that I’m unsure how to handle, and I’d appreciate feedback.
Behavior One
Both examples below throw fatal exceptions because no
PendingEventAttribute
is set before creating a group.What should be done, as I think groups should not be created without common attributes?
group
method to thePendingEventAttribute
class to prevent callingSchedule::group
directlyBehavior Two
The frequency of the second event becomes this:
The
hourly()
method with the group'sdaily()
results in a cron expression like0 0 * * *
, whereas the expected expression is0 * * * *
.Again what should be done when modifying group events?
* * * * *
so that thehourly()
generates correct frequency@stevebauman @rodrigopedra @taylorotwell Tagging you for your valuable input during the initial PR and hoping to get your feedback on this one as well.