Trouble with Campaigns and Cron

Hi. I’m looking for some help to fix my problem with Campaigns.
Everything in SuiteCRM is working well but I can’t run Cron jobs to send off campaigns.
My googling leads me to think that it may be because I didn’t install SuiteCRM with the correct user settings. I think it’s because I’m using root as the user. I installed SuiteCRM using Softaculous and I can’t recall being asked to use a non-root user.

I’d prefer a solution that didn’t involve too much messing around in SQL. I can cut and paste SQL if I have good instructions about where to put it.

Alternatively, perhaps some suggestions for someone I can pay for an hour’s work to fix this for me.

I’m using Version 7.10.5 hosted on an Apache server running Linux.

DO you have SSH access to your server? If so, please paste here the results of these commands, given from the root of your SuiteCRM installation:

ls -al
ps -ef | egrep '(httpd|apache2|apache)' | grep -v `whoami` | grep -v root | head -n1 | awk '{print $1}'
crontab -l -u root
crontab -l -u apache
1 Like

must be privileged to use -u

Ok, try just

crontab -l

If you already set up your Scheduler jobs, there should be an entry there. If not, you’ll have to add one. Maybe this can be done from CPanel.

1 Like

This is the crontab -l output

MAILTO="blahblah@gmail.com"
SHELL="/usr/local/cpanel/bin/jailshell"
11 14 * * 6 /usr/local/cpanel/3rdparty/bin/php /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/cli.php --backup --auto=1 --insid=26_10922
01 16 * * * /usr/local/cpanel/3rdparty/bin/php /usr/local/cpanel/whostmgr/docroot/cgi/softaculous/cli.php --backup --auto=1 --insid=26_89969
13 22 * * * /usr/local/cpanel/3rdparty/bin/php “/usr/local/cpanel/whostmgr/docroot/cgi/softaculous”/cli.php --backup --auto=1 --insid=492_41221

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

I have setup the scheduler jobs with the info at the bottom of the Scheduler page - * * * * * cd /home/melbou96/public_html/suitecrm; php -f cron.php > /dev/null 2>&1

Just apply the recommended permissions. From your SuiteCRM root folder give these commands:


  sudo chown -R melbou96:melbou96 .
  sudo chmod -R 755 .
  sudo chmod -R 775 cache custom modules themes data upload
  sudo chmod 775 config_override.php 2>/dev/null

You cron set up looks alright. You can check by going in Admin / Schedulers, and checking the “Last ran successfully” time in some of those jobs. Check also if they are in the correct timezone.

1 Like

Thanks again pgr.
I ran those commands using ssh. I had to remove the sudo for them to run.

All of my jobs still say ‘Last successful run: Never’.
I change one, so that it should be firing every minute and nothing on that either.

Any other tips?

pgr has been really helpful but I think I’ve reached the end of my technical knowledge.

Can anyone recommend someone that I can pay to do a few hours work on my server and CRM implementation?

I tried SalesAgility but they only have service packages. I think once I get over this hump that I’ll be able to maintain it myself.

Try changing your cron command like this:


* * * * * cd /home/melbou96/public_html/suitecrm;  /usr/local/cpanel/3rdparty/bin/php -f cron.php > /dev/null 2>&1

(I am adding a full PHP binary path, based on what I saw on your other existing cron commands).

1 Like

Thanks again pgr.
It all got a bit beyond my skills, so I contacted http://urdhva-tech.com/ based on a recommendation in one of pgr’s earlier posts.
They were amazing. The support guy spent over an hour working on my server and then didn’t charge anything.
The problem was solved by tweaking some of the server settings and also using pgr’s last suggestion.

I am glad you got it working! :slight_smile:

Thanks Nick for appreciating and also thanks to pgr!

Cheers!!