Run Nightly Mass Email Campaigns scheduler not working

Hello,

I’ve setup the Run Nightly Mass Email Campaigns scheduler but it doesn’t seem to work. I’m using a Linux server and have set up the cron job according to the instructions.

          • cd /home/rnroutso/public_html/internalcrm; php -f cron.php > /dev/null 2>&1 
            

I’ve set up the cron job in my server with the above line but it didn’t run. Also the scheduler is active in the admin panel. If it helps, the cron.php file in my instance’s root has a 644 permission.

Hi Sid

I’d be looking to see that it will run before adding it to cron.

What output do you get if you run that command directly at a prompt?

You might need to include paths or config options in your command line for your specific Linux, and therefore the same will need to be in cron as well.

cheers
Tony
http://www.wrenmaxwell.com.au

Hi,

I think the problem is the command… : what Sugar doc forgot about conjobs is to tell people to set a user in the crontab…
If you look in /etc/crontab under linux, u will see there are already existing cronjobs in you file.
The sructure should be always : ** *** +(user root or www-data or your name as linux user on the server) + command

So for u: * * * * * [color=#ff0000]USER[/color] cd /home/rnroutso/public_html/internalcrm; php -f cron.php > /dev/null 2>&1
If your /public_html/internalcrm is set for apache group as www-data:www-data, then [color=#ff0000]USER=www-data[/color]. If u use Root, you will create root entries in your /public_html/internalcrm… and your CRM should meet somme issues.

If there is no user set, who can drive the cronjobs ? I think Sugar is not at all complete and clear on this point!

Thanks Gips,

I’ll try it out and get back.

That didn’t work out Gips, it returned a ‘/usr/local/cpanel/bin/jailshell: rnroutso: command not found’ error.

The cron job ain’t working, the Send Queued Campaign Emails is not working if I manually send them, and also no error showing in the View Log with debug mode.

I even tried changing the Send Date of the queued emails to a back date, but that too isn’t working even if I manually send the mails from Send Queued Campaign Emails.

I’m just getting no clue as to what the problem might be :).

Please help.

The cron replied, Database failure. Please refer to sugarcrm.log for details.

On referring the sugarcrm.log file, I found the following warnings (no errors):

[WARN] Image icon_Home_32.png not found
[WARN] Image icon_Home_32.png not found
[WARN] Image CreateFP_Event_Locations.gif not found
[WARN] Image FP_Event_Locations.gif not found
[WARN] Image dashboard.png not found
[DEBUG] Hook called: ::server_round_trip
[DEBUG] Calling MySQLi::disconnect()

Any suggestion guys? Any lead on the above mentioned warnings?

Hi Sid

I’d start with verifying the file permissions and path settings for it.

Do those image files exist in the correct path? If so then Apache or PHP are not finding them which is a settings issue, either path or permissions.

I think image file issues are minor but possibly indicate a broader problem. Check the apache and php error logs for more clues.

Other questions to consider: Do all the other modules work as expected? Was this a fresh install ? Has email ever worked?

Hi Tony,

Checked the path and permissions. They’re all fine. The image not found is a general issue and doesn’t affect the system performance.

I’m trying with a new marketing email now. Let’s see if that works.

Near your Scheduler Check inbound mail… what is the message ? tagged as “Never”? Active or Unactive? Do you see jobs every minutes? If yes… cron is working. Also verify the end date for your tasks scheduler…if there is no end date… the job will not start.

Last thing to try is to change the command… and to indicate the php directory in cronjobs, as:

** *** [color=#ff0000]USER[/color] cd /home/rnroutso/public_html/internalcrm [color=#ff0000]&& /usr/bin/php -c /etc/php5/apache2/php.ini[/color] -f cron.php 2>&1

Good chance!

It worked! Had to setup a new marketing email and it worked fine.

Thank you guys for all the inputs :slight_smile: .