SCHEDULED REPORTS - Problem not sending email and fatal error

Hi.
I have a vary simple report, just lists the last week accounts. It is working if I run it directly.

I created a simple scheduled report to send an email to me ( emails are working fine).
It saves without any problem, and I get information that everything is ok.
In database I have the record:

mysql> select * from aor_scheduled_reports\G                                                                                                                                                                       *************************** 1. row ***************************
              id: ae5f5e34-1f85-ae0e-cfab-5e82a7a26aab
            name: teste email
    date_entered: 2020-03-31 02:14:13
   date_modified: 2020-03-31 02:25:26
modified_user_id: ccb1e9d3-8913-db9f-3ee6-5d3b0c855776
      created_by: ccb1e9d3-8913-db9f-3ee6-5d3b0c855776
     description: NULL
         deleted: 0
        schedule: 27 3 * * 2
        last_run: NULL
          status: active
email_recipients:  XXXXXXXX
aor_report_id: 983c4319-bd5c-581d-9361-5e82a704de1d

and the job queue gets this:

*************************** 3. row ***************************
assigned_user_id: 1
              id: d603b8cd-0ab0-1df6-5092-5e82ab08af40
            name: Run Report Generation Scheduled Tasks
         deleted: 0
    date_entered: 2020-03-31 02:31:01
   date_modified: 2020-03-31 02:32:01
    scheduler_id: 8814e90e-a118-810e-1b11-5e82a22034b0
    execute_time: 2020-03-31 02:31:00
          status: done
      resolution: failure
         message: Unexpected failure, please check PHP logs and suitecrm.log

          target: function::aorRunScheduledReports
            data: NULL
         requeue: 0
     retry_count: NULL
   failure_count: 1
       job_delay: 0
          client: CRON226ac1e531e09762af56ca8733d9afc0:13723
percent_complete: NULL

I get this in suitecrm.log

Tue Mar 31 03:16:03 2020 [13160][1][FATAL] Job a2fc80d4-aa96-870a-a51c-5e82a7229c19 (Run Report Generation Scheduled Tasks) failed in CRON run
Tue Mar 31 03:16:03 2020 [13160][1][INFO] Resolving job a2fc80d4-aa96-870a-a51c-5e82a7229c19 as failure: Unexpected failure, please check PHP logs and suitecrm.log

And I don’t get any more information in apache logs other than this:

[Tue Mar 31 03:31:29.208515 2020] [php7:notice] [pid 2192] [client 85.138.150.54:44326] PHP Notice:  Undefined index: aor_email_to_list in /var/www/suitecrm.javali.pt/htdocs/modules/AOR_Scheduled_Reports/emailRecipients.php on line 49, referer: https://suitecrm.javali.pt/index.php?action=ajaxui
[Tue Mar 31 03:31:29.208559 2020] [php7:notice] [pid 2192] [client 85.138.150.54:44326] PHP Notice:  Undefined index: email_to_type in /var/www/suitecrm.javali.pt/htdocs/modules/AOR_Scheduled_Reports/emailRecipients.php on line 61, referer: https://suitecrm.javali.pt/index.php?action=ajaxui

I am using
Version 7.11.13 / Sugar Version 6.5.25 (Build 344)
with PHP 7.2.24

What am I doing wrong?

Thanks,
Mário

Hi,
can you please try disabling errors in your apache config settings

display_errors=Off in php.ini file

and then restart the APACHE and they check it. These are just warnings. And they will be hidden after doing this.

Additionally you can check these URL’s


thanks

Hi.
Thanks for your answer.
I have the errors enabled because I am trying to debug what is causing this problem, if I disabled them, I still have the same problem if I disabled them.

I am using a Linux server with everything else working without any problem, so the common installation problems doesn’t seem to be the problem.

Thanks,
Mário

You say “email is working fine”. Specifically, is the Admin / Outbound Email / system account working fine?

Since we don’t have much to go by here, I recommend a couple of troubleshooting activities:

  1. Adding stack traces to see what is behind those notices in the logs
  2. looking for differences between web server PHP config, and CLI PHP config. They’re 2 different things, and the Reports run from web server normally, except when they are scheduled report, they run from CLI