How does WP Scheduling work?

Discussion in 'WordPress' started by Chuckun, Aug 27, 2010.

  1. #1
    I've never really looked into the brains of Wordpress, and I need an answer to this pretty quickly so rather than try figure it out, can anyone tell me how wordpress schedules posts?

    Far as I can see, it doesnt somehow set a cron job like you would via cPanel, so how does it work? I've never really used crons so sorry if I'm being totally ignorant here..

    Thanks a lot for any help,

    Chuckun

    EDIT: I thought I'd check while I was waiting, and from what I've gathered, wp-cron.php is just included in index.php (or any visitor-called file), which looks for any scheduled posts, and if the current time is greater than (or equal to) the scheduled time, then it will call whatever function is used to post 'unschedule' the scheduled post(s) which happen to be less than or equal to the current time?

    Am I right here?

    If so, this leads me to another question; surely this is a ridiculous way to do it? Why not a proper cronjob? This means several lines of php are slowing your site down at all times for no reason..?

    Thanks again,
    Chuckun
     
    Last edited: Aug 27, 2010
    Chuckun, Aug 27, 2010 IP
  2. Sokoto

    Sokoto Peon

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Personally I don't know how wordpress scheduling works in the background. All I do know is that whenever I schedule a post to go live @ a particular date and time, IT NEVER FAILS. Unfortunately most wordpress plug-ins that require cron don't just work. It's as though Wordpress's cron works for wordpress core system and nothing else i.e plug-ins :-(
     
    Sokoto, Aug 29, 2010 IP