in_exec handles errors in run_periodic to not crash silently