Running CiviCRM 4.7 on WordPress 4.7.3, hosted on a shared Linux server at 1and1.com.

CiviCRM System Status screen says "Cron not running" even though it is.

Trying to use wp-cli in crontab

wp help at the command line brings up the list of wp-cli commands.

Ran wp --info and got

PHP binary: /usr/bin/php5.5-cli
PHP version:    5.5.38
php.ini used:   /usr/lib/php5.5/php.ini
WP-CLI root dir:    /usr/share/php/wp-cli
WP-CLI packages dir:    
WP-CLI global config:   
WP-CLI project config:  
WP-CLI version: 1.0.0

So tried this in crontab (sensitive values changed):

*/2 * * * * /usr/share/php/wp-cli --user=cronuser --url=http://mydomain.org --path=/myserver/homepages/34/d1111111/htdocs/mysite/ civicrm api job.execute auth=0

Didn't seem to work, so I tried this from the command line:

/usr/share/php/wp-cli --user=cronuser --url=http://mydomain.org --path=/myserver/homepages/34/d1111111/htdocs/ysite/ civicrm api job.execute auth=0

And got:

/usr/share/php/wp-cli: Is a directory

There is a wp-content/plugins/civicrm/wp-cli directory. I tried using the full path to that instead of /usr/share/php/wp-cli but the same results.

Any suggestions would be welcome!

1 Answer 1


whereis wp showed wp: /usr/bin/wp, so I tried that in crontab and the problem appears to be solved!

System Status no longer says cron is not running and the "Last Run" column on Scheduled Jobs listing shows that the jobs have run.

successful crontab entry:

*/15 * * * * /usr/bin/wp --user=cronuser --url=http://mydomain.org --path=/myserver/homepages/34/d1111111/htdocs/mysite/ civicrm api job.execute auth=0
  • The "Cron not running" message means "No CiviCRM cron jobs have run", not that the system cron process is not running.
    – Aidan
    Commented Apr 12, 2017 at 9:05

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.