[wp-trac] Re: [WordPress Trac] #9005: Cron spawning improvements

WordPress Trac wp-trac at lists.automattic.com
Sat Jan 31 19:45:16 GMT 2009


#9005: Cron spawning improvements
-------------------------+--------------------------------------------------
 Reporter:  azaozz       |        Owner:  anonymous
     Type:  enhancement  |       Status:  new      
 Priority:  normal       |    Milestone:  2.8      
Component:  General      |      Version:           
 Severity:  normal       |   Resolution:           
 Keywords:               |  
-------------------------+--------------------------------------------------
Comment (by azaozz):

 Replying to [comment:6 Denis-de-Bernardy]:
 > k... one quick question: when the cron is called, do pages get cached?
 because if they do, that may lead to quite a few misses.

 There's no output from wp-cron unless there are php errors, so there's
 nothing to cache. Also the AJAX call has a different query string every
 time.

 > also, I vaguely recall that part of the reason that cron wasn't on an
 ajax query was to "profit" from spammers and spiders on low traffic blogs.
 this might be worth a revisit.

 Sure, that can be done. We could try looking at the request headers for
 the more common bots and run wp-cron then. Another idea was to run wp-cron
 together with wp-comment-post so all bots that post spam do something
 useful too...

 Replying to [comment:7 filosofo]:
 > The people who are helped by this--those whose servers can't resolve
 domain names--are in small minority...

 In many cases the problem seems to be that the site domain name is mapped
 to 127.0.0.1 in the hosts file and the web server won't connect back to
 itself.

 > ... So instead let's fallback for them on making a direct call to
 wp_cron() on shutdown.

 This was the first thing I've tested. Unfortunately that would slow down
 page load considerably in some cases.

 > A large proportion of most web traffic are bots, which we should be able
 to take advantage of for cron purposes, as Denis suggests. Consider a
 small blog, which may not get any human traffic in the middle of the
 night. Relying on the JS approach could still mean missed scheduled future
 posts.
 > It just seems hacky to have to count on website visitors with JavaScript
 enabled in order for cron to work.

 Perhaps we can try running wp-cron directly for all common bots and also
 together with wp-comments-post. Would rarely need the AJAX then as it's
 only added when there are cron jobs pending.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/9005#comment:8>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list