Opened 3 years ago
Closed 9 months ago
#49866 closed enhancement (duplicate)
Create pre and post actions for wp-cron jobs
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.4 |
Component: | Cron API | Keywords: | has-patch needs-testing |
Focuses: | performance | Cc: |
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