Issue #2220687 by znerol: Convert system_run_automated_cron into a subscriber for KernelEvents::TERMINATE.