id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,focuses 28635,Add status codes and hooks to wp-cron.php,westonruter,chriscct7,"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. ",feature request,reopened,normal,Future Release,Cron API,,normal,,has-patch,,