[wp-trac] [WordPress Trac] #49866: Create pre and post actions for wp-cron jobs

WordPress Trac noreply at wordpress.org
Thu Apr 9 20:49:59 UTC 2020


#49866: Create pre and post actions for wp-cron jobs
-------------------------+-------------------------------------
 Reporter:  nishisan     |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Cron API     |    Version:  5.4
 Severity:  normal       |   Keywords:  has-patch needs-testing
  Focuses:  performance  |
-------------------------+-------------------------------------
 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
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49866>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list