Join the community today
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:
    10:36 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

    53,554
    12,135
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,678
    Local Time:
    12:36 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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:
    10:36 PM
    Another neat feature of CMM, thank you.
     
  4. eva2000

    eva2000 Administrator Staff Member

    53,554
    12,135
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,678
    Local Time:
    12:36 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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:
    10:36 PM
    This will come in handy when I move all the small Wordpress sites together
     
  6. jacknguyen

    jacknguyen Member

    39
    6
    8
    Jun 3, 2022
    Ratings:
    +9
    Local Time:
    10:36 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.