Scheduled Report not running

Hi , I have created one report and I can see the result. I want to schedule it and have scheduled it as below but its not getting executed and last run time shows never.

cron job: Runs every 3 mins and it running fine.
Scheduler job: set as default (run asap, i.e. run every mins). I can see in logs that this is running everytime cron is run (.I…e running it every 3 mins)
This particular report: I also set this as run every min. (advance option */1 * * * *).

So I am expecting scheduler job to pick this report everytime it run, but somehow it is not. Any pointers?

In Admin / Schedulers, this job

Run Report Generation Scheduled Tasks

what does it show in “Last run successfully”? Do the times shown there sound right, or might they be in a different timezone?

If you’re running the cron.php from crontab, you can try this in a command line:

php -i | grep -i 'timezone\|php.ini'

This will tell you your current effective timezone setting for CLI PHP, and the path of the php.ini file in case you need to adjust it.

thanks for quick revert. Yes times seems ok from Admin -> Scheduler. I have set timezone from my profile to IST and it shows time in that format. I can see its running every 3 mins. I am not sure if this is tiemzone issue, as what I have setup is run every min (and since cron is running every 3 mins) ideally it should run every time cron runs.

I will check php setting in a while once I have host access.

Remember there are three schedules at work here (!)

  1. Schedule to run cron.php (as defined in crontab)

  2. Schedule to “Run Report Generation Scheduled Tasks” job (as defined in Admin / Schedulers)

  3. Schedule of each individual Report (as defined in Scheduled Reports module)

Yes, I have mentioned setting for all of three in first post. Not able to figure out whats wrong :frowning:

Most people run reports only once a day, or once a week, so those kinds of settings you’re trying might be buggy (once a minute, with the other schedules once every three minutes…).

I would try setting the Report to run only once at a specific time (like 5 minutes from now). Just to check if it works.

Keep your eyes on the logs to catch any errors. Maybe your report generation isn’t successful.

ok, I just wanted to check if its works that’s why set it as run per min. I have other report which I set last week to run daily at particular time… till date it has not run. So I doubt some other setting it causing this rather than time or particular report.

I found the error. I should have checked error log before.
I am on php 5.4. below line in AOR
PHP Fatal error: Can’t use function return value in write context in /modules/AOR_Reports/AOR_Report.php on line 551

if (empty(trim($groupValue))) {

I changed it to

 if(trim($groupValue) == false) {

and it worked fine.

1 Like

You don’t want that… :slight_smile:

Which version of SuiteCRM are you on? You should have at least PHP 5.5.9 for the latest SuiteCRM:

And you would be better of in terms of performance and security with PHP 7.