[wp-trac] [WordPress Trac] #23133: wp-cron fails to schedule posts

WordPress Trac noreply at wordpress.org
Mon Jan 28 16:30:18 UTC 2013


#23133: wp-cron fails to schedule posts
---------------------------+------------------------------
 Reporter:  prb22public@…  |       Owner:
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Cron           |     Version:  3.5
 Severity:  major          |  Resolution:
 Keywords:  dev-feedback   |
---------------------------+------------------------------
Changes (by SergeyBiryukov):

 * keywords:  dev-feedback 2nd-opinion => dev-feedback


Comment:

 Your host appears to block local HTTP requests.

 `WP_Http_Curl` didn't return an error, just an empty response (I've
 created #23310 for that). However, this simple example displays "Curl
 error: couldn't connect to host" when being run on your server:
 {{{
 function curl_test_23133() {
         $ch = curl_init();

         curl_setopt( $ch, CURLOPT_URL,
 'http://dev.crinniswoodmanagement.co.uk/' );
         curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );

         $result = curl_exec( $ch );
         if ( false === $result )
                 echo 'Curl error: ' . curl_error( $ch );
         curl_close($ch);

         echo $result;
 }
 }}}

 Other transports also returned errors:
 {{{
 WP_Http_Streams: Could not open handle for fopen() to ...
 WP_Http_Fsockopen: "110: Connection timed out"
 }}}

 The workaround is to use `ALTERNATE_WP_CRON`: [[BR]]
 http://codex.wordpress.org/Editing_wp-config.php#Alternative_Cron

 Another option is to add `DISABLE_WP_CRON` to your `wp-config.php` file
 and set up a cron job on the server to hit `wp-cron.php` every 1, 5, or 10
 minutes, or whatever you prefer.

 We could probably detect this situation and display some kind of warning
 in the admin.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23133#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list