#56048 closed enhancement (fixed)
Add error logging and hooks to wp-cron.php
Reported by: | Enchiridion | Owned by: | audrasjb |
---|---|---|---|
Milestone: | 6.1 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Cron API | Keywords: | has-patch commit add-to-field-guide |
Focuses: | Cc: |
Description
Rarely and randomly some of my custom cron events have disappeared. From searching around, I'm not the only one with this issue, and no one else was able to figure out why. I also was unable to debug the issue since wp-cron.php doesn't log any errors nor have any hooks to try handling them. This patch adds those in.
Attachments (2)
Change History (8)
#1
@
2 years ago
- Milestone changed from Awaiting Review to 6.1
- Type changed from defect (bug) to enhancement
- Version trunk deleted
@
2 years ago
Patch updated to add translator comments, remove "or false" from docblocks, and revert two line removals.
#3
@
2 years ago
- Keywords commit added
The patch works fine on my side and looks good to go.
As today is beta 1 release date, I'll self assign this enhancement so it can be committed in time for 6.1 beta 1. @johnbillion feel free to ping me if you're actively working on this right now so I can reassign it to you :)
Note: See
TracTickets for help on using
tickets.
Thanks for the ticket and the patch @Enchiridion.
Both the actions and the error logging make sense here and are a useful addition. I did think it would be beneficial to hook the calls to
error_log()
in via the actions, but it's additional overhead to introduce two new functions for this very narrow use case, so I think the direct calls toerror_log()
can suffice.