Campaign mail are not sending automatically

Hi all,

I have some problems with the campaign emails. They are not sending automatically, I have to send via in the email queue. Also the send test mail function is not working. The mails are not trying to be send, and the Scheduler hasn’t made a successful run yet.

I have set up my cron job as following: * * * * * /usr/bin/curl --silent --compressed http://localhost:8888/SuiteCRM-7.9.2/index.php

I hope that some one could help me. that would be great!

I’m working with a Mac and with Mamp.


Your cron tabs looks incorrect. It should be set to start cron.php and not index.php. Is there a reason for not calling the file directly?

Typically you would use the installed php cli on the same machine as the webserver to run the job. For Example:

          • cd /Applications/MAMP/htdocs/ SuiteCRM-7.9.2; php -f cron.php > /dev/null 2>&1


I have changed the cronjob to: * * * * * cd /Applications/MAMP/htdocs/SuiteCRM-7.9.2; php -f cron.php > /dev/null 2>&1

But it isn’t working at all.

What could be the problem?

I configure the cronjob with linux using: sudo crontab -e -u

but online I see a lot of other ways to do this. What is the correct way to set up the cronjob

I don’t have a mac to test this on. However, I think it is because you may not have php install everywhere on your computer.

Accroding to:

you should be able to set the php

alias php='/Applications/MAMP/bin/php5.5/bin/php'

Or you can change the path in cron tab to something like:

* * * * * cd /Applications/MAMP/htdocs/SuiteCRM-7.9.2; /Applications/MAMP/bin/php5.3/bin/php -f cron.php > /dev/null 2>&1

You might have to the php to the version you have installed.

The correct way is to edit the crontab for the same user account your webserver is using. So on linux that is typically www-data or httpd. However, if mamp starts the webserver under your account, it is probably using your account. The httpd.conf allows you to configure which username apache logins in as.

I will try the edited part.

How do I acces the crontab in the apache?

You can use crontab -e -u $(whoami)

I don’t understand why it isn’t working yet. Thank you a lot for your assistance.

run “whoami” first. this will give your username
and then try crontab -e -u

Done that, and set the cron like you said.

Is the cron service running?

sudo launchctl unload /System/Library/LaunchDaemons/com.vix.cron.plist
sudo launchctl load /System/Library/LaunchDaemons/com.vix.cron.plist

This is the output: /System/Library/LaunchDaemons/com.vix.cron.plist: service already loaded

But in my CRM the scheduled task are not running

Have you added your username into the cron_allowed_users array in the config.php file?

There was a change to prevent users from accidentally running the crontab under the wrong username.


Done, but now my arm isn’t functioning at all anymore…

… ?

I added my username in the array, and after that my CRM stop working just a blanc screen is showing. When I took my username out of the array it started functioning again.

That means your syntax is incorrect. Try something like this:

‘allowed_cron_users’ =>
array (
0 => ‘www-data’,
1 => ‘your-user-name’,

or to be more upgrade safe… edit the config_override.php file instead.

Then add:

$sugar_config['cron']['allowed_cron_users'][] = 'your-username';

Still nothing, but what I find weird is that when I set up my campaign and click on ‘send as test’ it doesn’t do anything.

But when I email the client directly it works fine.

Can you access your crontab log? Are there any errors in the suitecrm.log file or the apache log file which might be related to this issue?

Tue Aug 8 13:42:00 2017 [15264][-none-][FATAL] Could not connect to DB server localhost as root. port : No such file or directory

Tue Aug 8 13:42:00 2017 [15264][-none-][FATAL] Configuration variable date.timezone is not set, guessed timezone UTC. Please set date.timezone=“UTC” in php.ini!

These two keep occurring