Cron job fix

Hi all,
Hope this will help someone

On new installation, cron job did not run.
Suggested by SuiteCRM installer is to update crintab with:

          • cd /home/cupids/public_html/SuiteCRM-7.6.4; php -f cron.php > .dev/null &2>1

This is not quite right.

  1. If system runs cPanel, add script for the user CRM is installed under! Do it via cPanel. running it direct from /etc/crontab does not always work.

  2. Script has to be modified to be:

          • cd /home/cupids/public_html/SuiteCRM-7.6.4; php -f cron.php > .dev/null &2>1

php does not run scripts in “command line” mode when called from cron! cron.php detects it and fails. Running “php-cli” instead of just “php” fixes the problem.

Rudolf

Just to let you know your two cron line examples show exactly the same, I assume they should show differently.

Thanks,

Will.

Thank you Will,

Damn “copy and paste”.

It should read:
2. Script has to be modified to be:

          • cd /home/cupids/public_html/SuiteCRM-7.6.4; php-cli -f cron.php > .dev/null &2>1

Rudolf

1 Like

This worked on VPS on InMotionHosting.Com as well. The php-cli being the part I was missing. It was weird because I could tell the cron was running, and if I copied the cron command to shell it worked fine… but overall it didn’t work from crontab. With php-cli it did!