How can I set it so that cron jobs only send emails when there is an error

This should be opened as a new thread since it's not about the OP. I will merge your comment off into a new post.