I have a PHP script that I want to run on a cronjob. I am assuming if PHP fails due to a fatal error it will terminate the script which reports to cron of an error, however how do I force a failure reply that will instruct cron of an issue?
I will have some database calls and I want cron to report back an error (which fires off an email) if the database queries fail.