Answers.Body: <p>Are you sure that the path to cron.php is right on the new server? I recently had to set it up again on the new host (SiteGround), and the path was slightly different. What was surprising was that, by all indications, the cron job was executing successfully, but it silently didn't run the CiviCRM jobs. I still don't have a good answer on that.</p>
  
  <p>In cPanel, you can go into File Manager and check the path.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-03T19:09:56.603Z
Answers.LastActivityDate: 2019-01-03T19:09:56.603Z
Answers.UserDisplayName: RiverRunner
Body: <p>I'm on a shared hosting solution that I just moved over to. After the move, I did an upgrade to the newest CiviCRM version but left WordPress intact (no upgrade). Scheduled cron jobs were working fine on the previous host server, but not anymore. </p>
  
  <p>Current configuration:
  PHP: 7.2.13
  CiviCRM: 5.8.2 
  WordPress 4.9.9</p>
  
  <p>I updated the wget command I was using to capture the results in logs. In CPanel, the job looks like this:
  wget -O /home/xxx/public_html/cron_output.log -t 1 -a /home/xxx/public_html/cron.log '<a href="https://xxx/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=xxx&amp;pass=xxx&amp;key=xxx" rel="nofollow noreferrer">https://xxx/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=xxx&amp;pass=xxx&amp;key=xxx</a>'</p>
  
  <p>I know the syntax of the command is right because I can run the https: command from a web browser and everything works. </p>
  
  <p>The cron.log shows that it's run with the 200 OK response. The cron_output.log is empty (should it be?). </p>
  
  <p>--2019-01-02 12:50:01--  <a href="https://xxx/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=xxx&amp;pass=xxx&amp;key=xxx" rel="nofollow noreferrer">https://xxx/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=xxx&amp;pass=xxx&amp;key=xxx</a>
  Resolving xxx (xxx)... x.x.x.x
  Connecting to xxx (xxx)|x.x.x.x|:443... connected.
  HTTP request sent, awaiting response... 200 OK
  Length: 0 [text/html]
  Saving to: ‘/home/xxx/public_html/cron_output.log’</p>
  
  <p>The server logs that my hosting provider sent me show that the jobs run. </p>
  
  <p>I've also scheduled the same job in easycron and it shows that's it's run successfully.</p>
  
  <p>So I know that cron is running and the syntax is right. But the scheduled jobs in Civicrm don't run. There's nothing in any error_log anywhere that indicates there's a php problem. I've looked at the questions here, and checked that PHP and the MySQL database are on the same timezone, and they are. </p>
  
  <p>I cannot figure out why Civicrm is not running the scheduled jobs. I've tested with a scheduled mailing that sits there and never gets delivered (until you run the https:// command line manually, then it completes). Also the Administer -> System Settings -> Scheduled Jobs show that they are not being completed unless the cron job is manually triggered. And Civicrm has the orange System Status: Warning: Cron Not Running</p>
  
  <p>I'm stumped, and my provider says the issue is not with the server, and I tend to agree.</p>
  
  <p>Any thoughts as to next steps?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-02T19:45:26.737Z
Comments.Text: This is post is greyed out to me? Not sure why? I may have deleted it by mistake by trying to filter by tags and trying to delete a tag in my filter. Can't find any info in the help area as to why the post is greyed out.
Comments.UserDisplayName: Rachelle Niemela
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-03T19:22:50.440Z
Comments.Text: Your post shows that there's a `cron_output.log` - could you edit this question to say what, if anything, it contains?  I see you reference `error_log` but not the `cron_output.log`.
Comments.UserDisplayName: Jon G - Megaphone Tech
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-03T22:54:23.180Z
Comments.Text: It would be useful to know the hosting provider as that may well be a factor...
Comments.UserDisplayName: Mick Kahn
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-03T23:03:55.800Z
Comments.Text: I noted in the original text that the output log is empty. The hosting provider is Web Hosting Canada. They are working on it, but not getting very far. It took us two days to confirm that the cron job syntax is correct - we know this because I can run it from a web browser and that triggers all of the jobs that were pending in Civicrm.
Comments.UserDisplayName: Rachelle Niemela
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-04T13:27:13.997Z
Comments.Text: Just a note that I installed a test version of WordPress and CiviCRM and the cron jobs worked just fine. They didn't originally because I'd forgotten to adjust the timezome in WordPress, but once I did that, everything worked fine in the test environment. It's something that isn't quite working with the site that was transferred over.
Comments.UserDisplayName: Rachelle Niemela
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-01-11T17:25:39.647Z
Comments.Text: Found the solution! It was two-fold. One, the cron needed a --no-check-certificate switch on the command line, and two, the StopBadBots WordPress plugin had registered wget as a bad bot in its bad bot table. Had to disable the wget entry and then everything worked fine. The final cron command line is:
  
  /usr/bin/wget --no-check-certificate -O - -q -t 1 'https://xxxx/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=xxxx&pass=xxxx&key=xxxx'
Comments.UserDisplayName: Rachelle Niemela
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-29T12:33:45.653Z
Comments.Text: Rachelle - you should post your solution as an answer and accept it. Its fine to answer your own questions.
Comments.UserDisplayName: Mick Kahn
Tags: <wordpress><cron><cron-job>
Title: Issues with cron job - Wordpress
ThreadText: # Issues with cron job - Wordpress
  
  (Asked by: username_0 on 2019-01-02)
  
  I'm on a shared hosting solution that I just moved over to. After the move, I did an upgrade to the newest CiviCRM version but left WordPress intact (no upgrade). Scheduled cron jobs were working fine on the previous host server, but not anymore.
  
  Current configuration:
  PHP: 7.2.13
  CiviCRM: 5.8.2
  WordPress 4.9.9
  
  I updated the wget command I was using to capture the results in logs. In CPanel, the job looks like this:
  wget -O /home/xxx/public\_html/cron\_output.log -t 1 -a /home/xxx/public\_html/cron.log '<https://xxx/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=xxx&pass=xxx&key=xxx>'
  
  I know the syntax of the command is right because I can run the https: command from a web browser and everything works.
  
  The cron.log shows that it's run with the 200 OK response. The cron\_output.log is empty (should it be?).
  
  --2019-01-02 12:50:01-- <https://xxx/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=xxx&pass=xxx&key=xxx>
  Resolving xxx (xxx)... x.x.x.x
  Connecting to xxx (xxx)|x.x.x.x|:443... connected.
  HTTP request sent, awaiting response... 200 OK
  Length: 0 [text/html]
  Saving to: ‘/home/xxx/public\_html/cron\_output.log’
  
  The server logs that my hosting provider sent me show that the jobs run.
  
  I've also scheduled the same job in easycron and it shows that's it's run successfully.
  
  So I know that cron is running and the syntax is right. But the scheduled jobs in Civicrm don't run. There's nothing in any error\_log anywhere that indicates there's a php problem. I've looked at the questions here, and checked that PHP and the MySQL database are on the same timezone, and they are.
  
  I cannot figure out why Civicrm is not running the scheduled jobs. I've tested with a scheduled mailing that sits there and never gets delivered (until you run the https:// command line manually, then it completes). Also the Administer -> System Settings -> Scheduled Jobs show that they are not being completed unless the cron job is manually triggered. And Civicrm has the orange System Status: Warning: Cron Not Running
  
  I'm stumped, and my provider says the issue is not with the server, and I tend to agree.
  
  Any thoughts as to next steps?
  
  **Tags:** wordpress, cron, cron-job
  
  > **Comments:**
  > **username_0**: This is post is greyed out to me? Not sure why? I may have deleted it by mistake by trying to filter by tags and trying to delete a tag in my filter. Can't find any info in the help area as to why the post is greyed out.  
  > **username_1**: Your post shows that there's a `cron_output.log` - could you edit this question to say what, if anything, it contains?  I see you reference `error_log` but not the `cron_output.log`.  
  > **username_2**: It would be useful to know the hosting provider as that may well be a factor...  
  > **username_0**: I noted in the original text that the output log is empty. The hosting provider is Web Hosting Canada. They are working on it, but not getting very far. It took us two days to confirm that the cron job syntax is correct - we know this because I can run it from a web browser and that triggers all of the jobs that were pending in Civicrm.  
  > **username_0**: Just a note that I installed a test version of WordPress and CiviCRM and the cron jobs worked just fine. They didn't originally because I'd forgotten to adjust the timezome in WordPress, but once I did that, everything worked fine in the test environment. It's something that isn't quite working with the site that was transferred over.  
  > **username_0**: Found the solution! It was two-fold. One, the cron needed a --no-check-certificate switch on the command line, and two, the StopBadBots WordPress plugin had registered wget as a bad bot in its bad bot table. Had to disable the wget entry and then everything worked fine. The final cron command line is:  /usr/bin/wget --no-check-certificate -O - -q -t 1 'https://xxxx/wp-content/plugins/civicrm/civicrm/bin/cron.php?name=xxxx&pass=xxxx&key=xxxx'  
  > **username_2**: Rachelle - you should post your solution as an answer and accept it. Its fine to answer your own questions.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2019-01-03. Score: 0
  
  Are you sure that the path to cron.php is right on the new server? I recently had to set it up again on the new host (SiteGround), and the path was slightly different. What was surprising was that, by all indications, the cron job was executing successfully, but it silently didn't run the CiviCRM jobs. I still don't have a good answer on that.
  
  In cPanel, you can go into File Manager and check the path.
  
  
  ---
  
  