Explain how you would implement robust logging and error handling in a script meant to run as a cron job.