Every scheduler has no successful run

Hi guys. I got a problem with the scheduler in SuiteCRM 7.12.2 :

I have a linux Ubuntu 20.04 server running SuiteCRM 7.12.2

Apache2 server (User : www-data)

The problem : Every scheduler has no Successful run → Never.

The cron job has been set and seem to work.

I set the permissions for www-data as shoed in the suiteCRM docs.

When sending email manually via SuiteCRM it works but the campaign scheduler never run Nightly MASS sending email… or any of the scheduled jobs…

I looked on many forums discussions to seek an answer… but nothing works…

Anyone has an answer about schedulers who have a scheduled run of NEVER ?

The cron job has been set and seem to work.

welcome vinobierra.

What have you seen that makes you say that?

If you click on every Active schedule at /index.php?module=Schedulers&action=index - and NONE of them show date/times when they last ran…

Then that must be a fresh install, brand new?
Have you ever had Suite running in daily usage?

and root cause is very likely cron - what steps have you take to configure your cron and prove it works - (eg have you any cron tasks outside of SuiteCRM (eg a dummy task that say appends a date line to a file every minute)

Hi DJuser !
Thanks for your reply.

SuiteCRM has been installed since a couple of days.

No I don’t have other cron task outside SuiteCRM.

But if I do a nano on syslog, I see that the command of Cron for www-data seems to be running without errors. But no other proof than no message after the command is passed.

Do I need to put the root user on the permission inside the config.php file of SuiteCRM ?

Is there other things I must verify ?

I try rebuilding the default schedules et recreating a target list , a new campaign, repair the schedules etc…

The permissions of the /var/www/suitecrm folders and the folders indicated in the installation guide have the good permissions for the www-data (apache user)

I am out of Ideas…

that would be a good place to start - you need evidence to rule out that the problem is not cron at the OS level - with the same user.

Get your cron task to write to a file too - file permissions are a very common problem.

Would it be a good Idea to also include the root user in the permissions inside the config.pho file ? (www-data which is apache user is the only one in the permission right now)

Hey @vinobierra

What does your crontab hint suggest to you when you are on the SuiteCRM Scheduler screen (at the bottom)? In order to run SuiteCRM Schedulers, edit your web server user’s crontab file with this command:

sudo crontab -e -u www-data
... and add the following line to the crontab file:
*    *    *    *    *     cd /var/www/html/suitecrminstance; php -f cron.php > /dev/null 2>&1 

What does yours say?

There a good explaination on the importance of not running cron using root user here: Scheduler Jobs in SuiteCRM in Linux - the Definitive Guide – SuiteCRM In-depth – pgorod's collection of articles on SuiteCRM

This thread solution was the cron tab file itself so no necessarily the same issue we are seeing here, but does provide some troubleshooting actions you can read to help.

1 Like

It seems the same.

But the one in my www-data user crontab is php7.4 instead of php
and I use php7.4-fpm

I succeeded ! I had to modify my crontab for user www-data and include the directories where the suitecrm is located and also specify the fpm. here is the crontab line :

          • php -c /etc/php/7.4/fpm -f /var/www/suitecrm/cron.php > /dev/null 2>&1