Want more timely Centmin Mod News Updates?
Become a Member

Wordpress Cron job

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

  1. Jay Chen

    Jay Chen Active Member

    175
    57
    28
    Sep 10, 2017
    Ratings:
    +110
    Local Time:
    1:00 AM
    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

    48,826
    11,168
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,396
    Local Time:
    3:00 PM
    Nginx 1.21.x
    MariaDB 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
     
  3. Jay Chen

    Jay Chen Active Member

    175
    57
    28
    Sep 10, 2017
    Ratings:
    +110
    Local Time:
    1:00 AM
    Another neat feature of CMM, thank you.
     
  4. eva2000

    eva2000 Administrator Staff Member

    48,826
    11,168
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,396
    Local Time:
    3:00 PM
    Nginx 1.21.x
    MariaDB 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 Active Member

    175
    57
    28
    Sep 10, 2017
    Ratings:
    +110
    Local Time:
    1:00 AM
    This will come in handy when I move all the small Wordpress sites together