Fixed the code for retrieving daily metrics to use the action-scheduler library functions instead of wp-cron. Added a recurring background action that periodically checks for failed background processes.