Make cron async handling more robust and minimize duplicate code