-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
[6.x] Add events to signal when scheduled task runs #29888
Conversation
On single server events it seems to fire even when the event is never actually run on the given server. |
Right you are. I’ll update this PR to get the events to dispatch only within the |
Should be good for another look @taylorotwell |
@michaeldyrynda definitely not a requirement but any chance you can use rebase instead of merging in the 6.x branch into your PR? Keeps the commit history nice and clean. |
Did the rebase @driesvints 😘 |
Out of curiosity, shouldn't the new tag be 6.1 for new features?
|
Yeh, it should have been. |
The rest of that line says “... to the public API.” It’s not clear to me if adding events is part of the public API, though. For the record, I was expecting a minor bump with this change, but it’s a gray area imo. The other stuff that went into this release added test helper methods and I feel that those aren’t public API of the framework, either. |
We already have the
Illuminate\Console\Events\CommandStarting
andIlluminate\Console\Events\CommandFinished
events, but these are fired for any command that is run, be it via the CLI directly, or viaschedule:run
.Having the scheduled-task specific events makes it much easier to identify when a scheduled task runs, allowing better monitoring of these tasks in a more dynamic manner.