Want to subscribe to topics you're interested in?
Become a Member

Wordpress Cron job

Discussion in 'Blogs & CMS usage' started by Jay Chen, Oct 29, 2018.

  1. Jay Chen

    Jay Chen Member

    65
    15
    8
    Sep 10, 2017
    Ratings:
    +26
    Local Time:
    3:20 PM
    I want to disable Wordpress Cron, and setup a system cron that will call wp-cron.php every 5 min, so I have
    Code:
    */5 * * * * sleep 192s ; wget -O - -q -t 1 http://mysite.com/wp-cron.php?doing_wp_cron > /dev/null 2>&1
    I noticed the entry for wp-cron.php has sleep 192s, what is the purpose of this? Can I remove it?

    Thanks
     
  2. eva2000

    eva2000 Administrator Staff Member

    36,919
    8,074
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,438
    Local Time:
    6:20 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    sleep is random value added each centmin.sh menu option 22 run so that the cronjobs don't all run at same time if you have multiple wordpress installs - imagine if you had 100x wordpress installs
     
    • Like Like x 1
  3. Jay Chen

    Jay Chen Member

    65
    15
    8
    Sep 10, 2017
    Ratings:
    +26
    Local Time:
    3:20 PM
    Another neat feature of CMM, thank you.
     
    • Like Like x 1
  4. eva2000

    eva2000 Administrator Staff Member

    36,919
    8,074
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,438
    Local Time:
    6:20 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    IIRC, it was added due to Centmin Mod user feedback for when they had many wordpress install instances :)
     
  5. Jay Chen

    Jay Chen Member

    65
    15
    8
    Sep 10, 2017
    Ratings:
    +26
    Local Time:
    3:20 PM
    This will come in handy when I move all the small Wordpress sites together
     
    • Like Like x 1
..