I'm using the cli.php method to run cron as described in the System Administrator Guide.

I am able to run this command from ssh, and it seems to execute fine:

php /var/sites/c/<mydomain>/public_html/sites/all/modules/civicrm/bin/cli.php -s <mydomain> -u <mydrupalusername> -p <mydrupalpassword> -e Job -a execute

Immediately after running that CiviCRM's System Status page will be updated with the time it ran.

However, when I use my host's control panel to run that every 15 minutes, nothing seems to happen, and the CiviCRM status page eventually returns to saying 'Cron not running'.

The advanced view of my host's control panel, which supposedly lets me edit the raw crontab, shows the following line:

*/15 * * * * php /var/sites/c/<mydomain>/public_html/sites/all/modules/civicrm/bin/cli.php -s <mydomain> -u <mydrupalusername> -p <mydrupalpassword> -e Job -a execute

But nothing is happening at the 15 minute intervals. CiviCRM's status page doesn't update. I have the CiviCRM Update Check set to always run as well, and that doesn't update on the scheduled jobs settings page either.

I've spoken to my host's support, and they insist that it is running the command every 15 minutes, and that it should be doing it with the same rights and in the same location as it does when I run it manually via ssh.

The host's logs that I can see via the control panel update every 15 minutes with this line:

Jul 17 12:45:24 cron2-lxc crond[107640]: (<myhostingusername>) CMD (php /var/sites/c/<mydomain>/public_html/sites/all/modules/civicrm/bin/cli.php -s <mydomain> -u <mydrupalusername> -p <mydrupalpassword> -e Job -a execute)

What's going wrong?

1 Answer 1


I think you probably will need to provide full path of php to execute php files.

You can try the option from https://stackoverflow.com/questions/19916949/running-php-from-cron-did-not-run-as-cli/19917512#19917512



  • Thank you! For some reason when I'd tried to add the line with the full path through the host's control panel it rejected it, but if I edit it into the raw crontab it now seems to work fine. Commented Jul 20, 2018 at 12:27
  • Congrats for making it work :) Commented Jul 20, 2018 at 12:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.