Answers.Body: <p>I think you probably will need to provide full path of php to execute php files. </p>
  
  <p>You can try the option from <a href="https://stackoverflow.com/questions/19916949/running-php-from-cron-did-not-run-as-cli/19917512#19917512">https://stackoverflow.com/questions/19916949/running-php-from-cron-did-not-run-as-cli/19917512#19917512</a></p>
  
  <p>HTH</p>
  
  <p>Pradeep</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-20T12:27:59.503Z
Answers.Text: 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.
Answers.UserDisplayName: somnolentsurfer
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-20T12:29:16.500Z
Answers.Text: Congrats for making it work :)
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-17T14:54:44.473Z
Answers.LastActivityDate: 2018-07-17T14:54:44.473Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>I'm using the cli.php method to run cron as <a href="https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/" rel="nofollow noreferrer">described</a> in the System Administrator Guide.</p>
  
  <p>I am able to run this command from ssh, and it seems to execute fine:</p>
  
  <pre><code>php /var/sites/c/&lt;mydomain&gt;/public_html/sites/all/modules/civicrm/bin/cli.php -s &lt;mydomain&gt; -u &lt;mydrupalusername&gt; -p &lt;mydrupalpassword&gt; -e Job -a execute
  </code></pre>
  
  <p>Immediately after running that CiviCRM's System Status page will be updated with the time it ran.</p>
  
  <p>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'.</p>
  
  <p>The advanced view of my host's control panel, which supposedly lets me edit the raw crontab, shows the following line:</p>
  
  <pre><code>*/15 * * * * php /var/sites/c/&lt;mydomain&gt;/public_html/sites/all/modules/civicrm/bin/cli.php -s &lt;mydomain&gt; -u &lt;mydrupalusername&gt; -p &lt;mydrupalpassword&gt; -e Job -a execute
  </code></pre>
  
  <p>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.</p>
  
  <p>I've spoken to my host's support, and they insist that it <em>is</em> 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.</p>
  
  <p>The host's logs that I can see via the control panel update every 15 minutes with this line:</p>
  
  <pre><code>Jul 17 12:45:24 cron2-lxc crond[107640]: (&lt;myhostingusername&gt;) CMD (php /var/sites/c/&lt;mydomain&gt;/public_html/sites/all/modules/civicrm/bin/cli.php -s &lt;mydomain&gt; -u &lt;mydrupalusername&gt; -p &lt;mydrupalpassword&gt; -e Job -a execute)
  </code></pre>
  
  <p>What's going wrong?</p>
  
Tags: <drupal><installation><cron><cli>
Title: CiviCRM reports Cron not running, but my web host is adamant that it is
ThreadText: # CiviCRM reports Cron not running, but my web host is adamant that it is
  
  (Asked by: username_0 on 2018-07-17)
  
  I'm using the cli.php method to run cron as [described](https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/) 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?
  
  **Tags:** drupal, installation, cron, cli
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-07-17. Score: 1 | Accepted answer
  
  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>
  
  HTH
  
  username_1
  
  > **Comments:**
  > **username_0**: 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.  
  > **username_1**: Congrats for making it work :)  
  
  ---
  
  