title: Plesk 12 Schedule Task, Manually Force Email on Error
body: <p>I'm trying to figure out how to make sure that I'm sent an email if an error occurs within the script that I'm calling via URL. I thought that by throwing a PHP Exception, the Scheduled Task would consider that a good reason to email me ... but no.</p>
  
  <p>Is there a way to ensure that the Cron notifies me if the script itself throws and exception, or something similar?</p>
  
  <pre><code>try {
      $connect = $rets-&gt;Login();
  } catch (Exception $e) {
      echo 'Caught exception: ',  $e-&gt;getMessage(), PHP_EOL;
      throw new Exception("caught for demonstration");
  }
  </code></pre>