wp cron event list, and the hook nobody knew about

WordPress’s scheduler is a table of events run opportunistically on page loads, and a site with a ten-year plugin history has entries pointing at functions that no longer exist.

$ wp cron event list --fields=hook,next_run_relative,recurrence
hook                     next_run_relative  recurrence
wp_version_check         4 hours            12 hours
old_plugin_daily_sync    14 years ago       1 day     ← orphaned
turkerdev_rebuild_index  23 minutes         1 hour

$ wp cron event delete old_plugin_daily_sync

An event whose callback is gone fires on every page load, fails silently and is never removed, which is a small permanent tax on every request. A relative time in the past is the tell. Setting DISABLE_WP_CRON and running wp cron event run --due-now from a real cron is the arrangement worth having, because it stops scheduling depending on whether anybody visited the site.