wordpress-website-lifecycle/debug/debug-wp-cron-event.php
2025-08-06 16:57:13 +00:00

24 lines
493 B
PHP

<?php
/*
* Plugin Name: Cron event logger (DBG)
* Plugin URI: https://github.com/szepeviktor/wordpress-website-lifecycle
*/
if (defined('DOING_CRON') && DOING_CRON) {
add_action(
'all',
static function ($hook_name) {
// From wp-cron.php
global $hook;
if ($hook_name !== $hook) {
return;
}
error_log('[CRON] Event running: ' . $hook_name);
},
PHP_INT_MAX,
1
);
}