Opened 7 years ago
Closed 4 years ago
#49866 closed enhancement (duplicate)
Create pre and post actions for wp-cron jobs
| Reported by: | nishisan | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Cron API | Version: | 5.4 |
| Severity: | normal | Keywords: | has-patch needs-testing |
| Cc: | Focuses: | performance |
Description
Some times its dificult to track jobs that impacts in server and db performance within wp-cron. This patch, creates two new hooks: pre_wp_cron_run and post_wp_cron_run.
Eventually a plugin development to track jobs can easily be implemented:
Bellow a conceptual log file from the conceptual plugin
09-04-2020 20:28:00.254607 - [DEBUG] - Cron Job Activated: [action_scheduler_run_queue] 2fa91486-91ce-4678-a2e1-4bff02340952 09-04-2020 20:28:00.294418 - [DEBUG] - Cron Job Terminated: [action_scheduler_run_queue] 2fa91486-91ce-4678-a2e1-4bff02340952
Attachments (1)
Change History (2)
Note:
See TracTickets
for help on using tickets.
wp-cron.php Patch for new hooks