Answers.Body: <p><code>whereis wp</code> showed <code>wp: /usr/bin/wp</code>, so I tried that in crontab and the problem appears to be solved!</p>
  
  <p>System Status no longer says cron is not running and the "Last Run" column on Scheduled Jobs listing shows that the jobs have run.</p>
  
  <p>successful crontab entry:</p>
  
  <pre><code>*/15 * * * * /usr/bin/wp --user=cronuser --url=http://mydomain.org --path=/myserver/homepages/34/d1111111/htdocs/mysite/ civicrm api job.execute auth=0
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-04-12T09:05:28.327Z
Answers.Text: The "Cron not running" message means "No CiviCRM cron jobs have run", not that the system cron process is not running.
Answers.UserDisplayName: Aidan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-04-12T02:22:50.683Z
Answers.LastActivityDate: 2017-04-13T16:22:46.160Z
Answers.LastEditDate: 2017-04-13T16:22:46.160Z
Answers.UserDisplayName: user1147171
Body: <p>Running CiviCRM 4.7 on WordPress 4.7.3, hosted on a shared Linux server at 1and1.com. </p>
  
  <p>CiviCRM System Status screen says "Cron not running" even though it is.</p>
  
  <p>Trying to use wp-cli in crontab</p>
  
  <p><code>wp help</code> at the command line brings up the list of wp-cli commands.</p>
  
  <p>Ran wp --info and got</p>
  
  <pre><code>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
  </code></pre>
  
  <p>So tried this in crontab (sensitive values changed):</p>
  
  <pre><code>*/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
  </code></pre>
  
  <p>Didn't seem to work, so I tried this from the command line:</p>
  
  <pre><code>/usr/share/php/wp-cli --user=cronuser --url=http://mydomain.org --path=/myserver/homepages/34/d1111111/htdocs/ysite/ civicrm api job.execute auth=0
  </code></pre>
  
  <p>And got:</p>
  
  <pre><code>/usr/share/php/wp-cli: Is a directory
  </code></pre>
  
  <p>There is a <code>wp-content/plugins/civicrm/wp-cli</code> directory. I tried using the full path to that instead of <code>/usr/share/php/wp-cli</code> but the same results.</p>
  
  <p>Any suggestions would be welcome!</p>
  
Tags: <wordpress><cron>
Title: "Cron not running" (but it is), trying to use wp-cli in crontab, with WordPress
ThreadText: # "Cron not running" (but it is), trying to use wp-cli in crontab, with WordPress
  
  (Asked by: username_0 on 2017-04-12)
  
  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!
  
  **Tags:** wordpress, cron
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2017-04-12. Score: 2
  
  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
  
  > **Comments:**
  > **username_1**: The "Cron not running" message means "No CiviCRM cron jobs have run", not that the system cron process is not running.  
  
  ---
  
  