I noticed some leftover cron jobs on production, so I'd like to add a simple tool to report all cron schedules that don't have a hook.
I believe you can just use has_action() to check which cron hooks don't have any registered handlers. The scheduled crons are in get_option( 'cron' ) as seen in the private function __get_cron_array().
I noticed some leftover cron jobs on production, so I'd like to add a simple tool to report all cron schedules that don't have a hook.
I believe you can just use
has_action()
to check which cron hooks don't have any registered handlers. The scheduled crons are inget_option( 'cron' )
as seen in the private function__get_cron_array()
.