OJS Added ScheduledTask isn't outputting error?

Hey all,

I am working with OJS for the first time and I am trying to add a new ScheduledTask. I have it running and can see that the ScheduledTask was executed however even if I do a fatalError in any of the ScheduledTasks such as OpenAddressNotification then it doesn’t get outputted when I run the cron manually like so:

I just get an empty output on the command line which indicates everything ran successfully and I can see the last_run time in the scheduled_tasks table is updated.

See my added ScheduledTask below that I am trying to execute and spit errors out to the command line…


 * @defgroup tasks

 * @file classes/tasks/OpenAccessNotification.inc.php


  class EmailArticlePublished extends ScheduledTask {

   * Constructor.
  function EmailArticlePublished() {

   * @see ScheduledTask::getName()
  function getName() {
    return __('admin.scheduledTask.EmailArticlePublished');

   function sendNotification () {
   fatalError('Email Sent');

function sendNotifications ($articles) {

    $email = new MailTemplate('OPEN_ACCESS_NOTIFY', $articles->getPrimaryLocale(), false, $articles, false, true);


    $mimeBoundary = '==boundary_' . md5(microtime());

    $templateMgr =& TemplateManager::getManager();
    $templateMgr->assign('body', $email->getBody($articles->getPrimaryLocale()));
    $templateMgr->assign('mimeBoundary', $mimeBoundary);

    $email->addHeader('MIME-Version', '1.0');
    $email->setContentType('multipart/alternative; boundary="'.$mimeBoundary.'"');
    $templateMgr->assign_by_ref('publishedArticles', $publishedArticles);



 * @see ScheduledTask::executeActions()

function executeActions() {
    $articleDao =& DAORegistry::getDAO('PublishedArticle');
    $articles =& $articleDao->getLatestPublishedArticles();



      return true;



And I have added it to the scheduledTasks.xml and I know it’s running but none of my errors are being outputted?

<task class="classes.tasks.EmailArticlePublished">
	<descr>Send automated email to all article authors and editors once the article has been published</descr>
	<frequency month="0"/>

Any help is appreciated.