Get the most out of your Centmin Mod LEMP stack
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

    181
    60
    28
    Sep 10, 2017
    Ratings:
    +116
    Local Time:
    7:07 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

    51,981
    11,976
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,473
    Local Time:
    9:07 AM
    Nginx 1.25.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

    181
    60
    28
    Sep 10, 2017
    Ratings:
    +116
    Local Time:
    7:07 PM
    Another neat feature of CMM, thank you.
     
  4. eva2000

    eva2000 Administrator Staff Member

    51,981
    11,976
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,473
    Local Time:
    9:07 AM
    Nginx 1.25.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

    181
    60
    28
    Sep 10, 2017
    Ratings:
    +116
    Local Time:
    7:07 PM
    This will come in handy when I move all the small Wordpress sites together
     
  6. jacknguyen

    jacknguyen Member

    36
    4
    8
    Jun 3, 2022
    Ratings:
    +7
    Local Time:
    7:07 AM
    1.5
    10
    I am hosting about 15 small websites, and it seems there is an issue somewhere. Every day, I have to reboot the server for the websites to be accessible normally.