handle execeptions thrown by run_command in cron.