[wp-trac] [WordPress Trac] #28635: Add status codes and hooks to wp-cron.php

WordPress Trac noreply at wordpress.org
Wed Jun 25 18:06:06 UTC 2014


#28635: Add status codes and hooks to wp-cron.php
-----------------------------+-----------------------------
 Reporter:  westonruter      |      Owner:
     Type:  feature request  |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Cron API         |    Version:
 Severity:  normal           |   Keywords:  has-patch
  Focuses:                   |
-----------------------------+-----------------------------
 I've been debugging a site problem which turned out to be one of the cron
 actions resulting in a memory limit breach, and so PHP did a fatal error
 in the middle of the cron loop. (It's a high-traffic site so it has
 `DISABLE_WP_CRON` with system cron pinging wp-cron.php every minute.)
 There is currently very little debugging hooks provided in `wp-cron.php`
 to help diagnose why and where a scheduled event hook is failing.

 Some ideas for how `wp-cron.php` could be improved to facilitate debugging
 (and also to help with general logging):

  * Return a status message pinpointing at which point `wp-cron.php` exited
  * Return relevant HTTP status codes
  * Allow `die` behavior to be overridden, similarly to how `wp_die()` is
 used elsewhere
  * Add hooks before before and after each level in the triple-nested crons
 loop.

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


More information about the wp-trac mailing list