Answers.Body: <p>I prefer the wp-cli method to all other methods.   Can this work at your host?  <a href="https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/#wp-cli" rel="nofollow noreferrer">https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/#wp-cli</a></p>
  
  <p>If you do not have Command line access, but the host provides a cron interface and wp-cli you can create a shell script to call:</p>
  
  <pre><code>#!/bin/bash 
  /path/to/cli/php /path/to/wp --user=&lt;cron user&gt; --url=https://&lt;site&gt; --path=/path-to-web-root --timezone="&lt;php timezone&gt;" civicrm api job.execute auth=0
  </code></pre>
  
  <p>In your example calling just <code>php</code> may be the issue as cron may not now the path to the cli php executable.  </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-01T19:02:51.427Z
Answers.Text: I just finished talking to Tech Support for the host and they said that cron job has been running every 5 minutes without fail.  Yet in Civi it says it has not run since  June 29th, 2019 3:46 PM.    Do you have any idea why this would be?
Answers.UserDisplayName: fdarn
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-01T19:37:20.290Z
Answers.Text: On another note. I just tried a test scheduled mailing. I set it to send 5 minutes later and 30 minutes later it still has not sent.  The server host shows that my cron command is running every 5 minutes but it is clearly not doing what it should be doine. Civi says the resource URL is wrong and cron is not running.  could this be related?
Answers.UserDisplayName: fdarn
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-01T12:56:48.963Z
Answers.LastActivityDate: 2019-07-01T12:56:48.963Z
Answers.UserDisplayName: Kevin Cristiano
Answers.Body: <p>Did you possibly try using <a href="https://www.easycron.com/" rel="nofollow noreferrer">https://www.easycron.com/</a> (as described <a href="https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/#webcron" rel="nofollow noreferrer">https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/#webcron</a>) and seeing if that will work. Like this you can see if the problem is with your civi instalation or your web host. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-02T01:14:04.127Z
Answers.Text: Thank you. I tried doing that.  I keep getting this error ERROR: You need to send a valid user name and password to execute this file.   I changed the password and made sure it is right but it still won't work.  To clarify, is this the username and password of a Wordpress user with admin access?  Or is it another user name and password?
    .
Answers.UserDisplayName: fdarn
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-02T01:27:00.980Z
Answers.Text: It is failing every test on easycron
Answers.UserDisplayName: fdarn
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-02T04:50:41.337Z
Answers.Text: Yes, It is the username and password for word press. are you including the sitekey?
Answers.UserDisplayName: netzih
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-02T05:06:06.380Z
Answers.Text: @fdarn If using easycron the URL to call would be https://secure.domain.org/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=WPUSERNAME&pass=WPPASS&key=CIVICRMsitekey 
  
  Remember to add www if needed and I'm assuming you have https. (otherwise change to http)
Answers.UserDisplayName: netzih
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-02T09:43:18.343Z
Answers.Text: i don't see any space for adding a Key in easycron.  Actually the instructions in that link don't seem to match what I see there.
Answers.UserDisplayName: fdarn
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-02T10:03:56.103Z
Answers.Text: I just ran it with the to call just like you typed it without adding the file and I got no errors.  But still the scheduled mail in Civi did not send.
Answers.UserDisplayName: fdarn
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-02T10:08:14.450Z
Answers.Text: when I try it with a file /cron.php returns the error ERROR: You need to send a valid user name and password to execute this file.  As far as I can tell the user name and password is correct.  If I try it with cli.php it says that cli can only be run from command line.  If I leave it as just /bin/ it executes successfully with no errors, but nothing happens in Civi.
Answers.UserDisplayName: fdarn
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-01T23:31:57.243Z
Answers.LastActivityDate: 2019-07-01T23:31:57.243Z
Answers.UserDisplayName: netzih
Body: <p>Civi 5.14 on WordPress 5.0</p>
  
  <p>Hello,
  I have installed and am configuring Civi for a new client.  He is on Inmotion Hsosting and civi is installed in a subdomain.   I am having problems getting cron to run. It is not running by itself at all.  Am I am missing a step somewhere or is my command line missing something? The wordpress user password is only numbers and letters, no other characters.  </p>
  
  <p>Cron Command line:</p>
  
  <p><strong>php -q /home/username/secure.domain.org/wp-content/plugins/civicrm/civicrm/bin/cli.php -s domain.org -u wordpressuser -p wordpressuserpassword -e Job -a execute > /dev/null 2>&amp;1</strong></p>
  
  <p><a href="https://i.sstatic.net/BAnIZ.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/BAnIZ.png" alt="enter image description here"></a></p>
  
  <p>Thank you</p>
  
  <p><strong><em>UPDATE</em></strong></p>
  
  <p>I just finished talking to Tech Support for the host and they said that cron job has been running every 5 minutes without fail. Yet in Civi it says it has not run since June 29th, 2019 3:46 PM. </p>
  
  <p>On another note. I just tried a test scheduled mailing. I set it to send 5 minutes later.  It still has not sent. The server host shows that my cron command is running every 5 minutes but it is clearly not doing what it should be doine. Civi says the resource URL is wrong and cron is not running. could this be related? </p>
  
Tags: <wordpress><cron><cron-job>
Title: Problems setting up cron
ThreadText: # Problems setting up cron
  
  (Asked by: username_0 on 2019-07-01)
  
  Civi 5.14 on WordPress 5.0
  
  Hello,
  I have installed and am configuring Civi for a new client. He is on Inmotion Hsosting and civi is installed in a subdomain. I am having problems getting cron to run. It is not running by itself at all. Am I am missing a step somewhere or is my command line missing something? The wordpress user password is only numbers and letters, no other characters.
  
  Cron Command line:
  
  **php -q /home/username/secure.domain.org/wp-content/plugins/civicrm/civicrm/bin/cli.php -s domain.org -u wordpressuser -p wordpressuserpassword -e Job -a execute > /dev/null 2>&1**
  
  [![enter image description here](https://i.sstatic.net/BAnIZ.png)](https://i.sstatic.net/BAnIZ.png)
  
  Thank you
  
  ***UPDATE***
  
  I just finished talking to Tech Support for the host and they said that cron job has been running every 5 minutes without fail. Yet in Civi it says it has not run since June 29th, 2019 3:46 PM.
  
  On another note. I just tried a test scheduled mailing. I set it to send 5 minutes later. It still has not sent. The server host shows that my cron command is running every 5 minutes but it is clearly not doing what it should be doine. Civi says the resource URL is wrong and cron is not running. could this be related?
  
  **Tags:** wordpress, cron, cron-job
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2019-07-01. Score: 2
  
  I prefer the wp-cli method to all other methods.   Can this work at your host?  https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/#wp-cli
  If you do not have Command line access, but the host provides a cron interface and wp-cli you can create a shell script to call:
  #!/bin/bash 
  /path/to/cli/php /path/to/wp --user= --url=https:// --path=/path-to-web-root --timezone="" civicrm api job.execute auth=0
  
  In your example calling just php may be the issue as cron may not now the path to the cli php executable.
  
  > **Comments:**
  > **username_0**: I just finished talking to Tech Support for the host and they said that cron job has been running every 5 minutes without fail.  Yet in Civi it says it has not run since  June 29th, 2019 3:46 PM.    Do you have any idea why this would be?  
  > **username_0**: On another note. I just tried a test scheduled mailing. I set it to send 5 minutes later and 30 minutes later it still has not sent.  The server host shows that my cron command is running every 5 minutes but it is clearly not doing what it should be doine. Civi says the resource URL is wrong and cron is not running.  could this be related?  
  
  ---
  
  ### Answer by username_2 on 2019-07-01. Score: 0
  
  Did you possibly try using <https://www.easycron.com/> (as described <https://docs.civicrm.org/sysadmin/en/latest/setup/jobs/#webcron>) and seeing if that will work. Like this you can see if the problem is with your civi instalation or your web host.
  
  > **Comments:**
  > **username_0**: Thank you. I tried doing that.  I keep getting this error ERROR: You need to send a valid user name and password to execute this file.   I changed the password and made sure it is right but it still won't work.  To clarify, is this the username and password of a Wordpress user with admin access?  Or is it another user name and password?   .  
  > **username_0**: It is failing every test on easycron  
  > **username_2**: Yes, It is the username and password for word press. are you including the sitekey?  
  > **username_2**: @username_0 If using easycron the URL to call would be https://secure.domain.org/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=WPUSERNAME&pass=WPPASS&key=CIVICRMsitekey   Remember to add www if needed and I'm assuming you have https. (otherwise change to http)  
  > **username_0**: i don't see any space for adding a Key in easycron.  Actually the instructions in that link don't seem to match what I see there.  
  > **username_0**: I just ran it with the to call just like you typed it without adding the file and I got no errors.  But still the scheduled mail in Civi did not send.  
  > **username_0**: when I try it with a file /cron.php returns the error ERROR: You need to send a valid user name and password to execute this file.  As far as I can tell the user name and password is correct.  If I try it with cli.php it says that cli can only be run from command line.  If I leave it as just /bin/ it executes successfully with no errors, but nothing happens in Civi.  
  
  ---
  
  