(Run Report Generation Scheduled Tasks) failed in CRON run

(Previous post didn’t ‘take’, I’m sorry if this becomes a duplicate)

I ran into the same issue at my company and decided to dig into the code and get to the bottom of it. I found a bug in the function call that handles scheduled reports, plugged in what seemed like a logical fix and it stopped the errors and started flowing emailed reports.

What I modified may not have actually been the right thing to fix but it does seem to work. I submitted a pull request on github here: https://github.com/salesagility/SuiteCRM/pull/1344

Basically, the aorRunScheduledReports function needs a return in order to not fail. As of the time of my edit, it didn’t have one, so I added a ‘return true’ to it and boom it works. :stuck_out_tongue:

Hopefully this will be useful to the developers.

I had the same problem but opendna’s suggestion fixed mine.

I have Debian, and the cron tab calls for this syntax

#-------    m h dom mon dow user command
I HAD)      * * * * *  www-data cd /var/www/html/suitecrm; php -f cron.php > /dev/null 2> 1
NOW )       * * * * *  www-data cd /var/www/html/suitecrm; www-data php -f cron.php > /dev/null 2>&1 

I was wrong. This caused the cron job to not be properly executed (that is why the error message was not generated anymore.) I have to correct to syntax compliant * * * * * www-data cd /var/www/html/suitecrm; php -f cron.php > /dev/null

Hi. I am having the same problem.

I’ve created some reports and want to try to automate the sending of one via eMail.

This is in my test server running 7.7.4

I get the same error message as the subject in my suitecrm.log file.

In config.php I have this.
‘default_permissions’ =>
array (
‘dir_mode’ => 1528,
‘file_mode’ => 432,
‘user’ => ‘’,
‘group’ => ‘’,
),

I’ve seen these mentioned but to be honest i’m not sure what relationship they have to this issue…

I have root access to the server.
I’ve logged in and done crontab -l

test:/srv/www/htdocs # crontab -l

DO NOT EDIT THIS FILE - edit the master and reinstall.

(/tmp/crontab.7IrSF4 installed on Mon Oct 26 10:01:16 2015)

(Cronie version 4.2)

          • cd /srv/www/htdocs; php -f cron.php > /dev/null 2>&1
            That looks fine and it’s running it as it has the error in the subject every minute in the log.

If I manually run the command it comes back with no errors.

test:/srv/www/htdocs # php -f cron.php
test:/srv/www/htdocs #

I have a permissions script that is a bit lazy and changes all the permissions to 777 /srv/www/htdocs and it does a chown wwwrun and a chgrp to www which are the correct user and group.

What am I doing wrong. I only have the one scheduled report that i’ve just created.

OK… Fixed my error all down to user error. Didn’t have scheduled reports module visible. When I made it visible it showed there were still some old incorrectly setup reports trying to run and so i removed all of these. Then the error went away.

So down to the actual reports themselves. Now waiting to see if my report works :slight_smile: Fingers crossed…

… Woooohoooo ti works.

So if like me you have problems delete previous reports and start again.

Changing ownership of files to apache:apache solved the issue on CentOS.