Learn about Centmin Mod LEMP Stack today
Register Now

Wordpress wp-updater cronjob

Discussion in 'Blogs & CMS usage' started by Sunka, Jan 22, 2016.

  1. Sunka

    Sunka Active Member

    917
    240
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +388
    Local Time:
    12:41 AM
    Nginx 1.13.3
    MariaDB 10.1.24
    This cron executed about 60 times last night and send me 60 e-mails

    Code:
    * 1 * * 5 sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null
    This is cron log

    Code:
    Jan 22 01:00:02 tvor-ocean CROND[18272]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:00:02 tvor-ocean CROND[18276]: (root) CMD (/usr/bin/chown -R nginx:nginx /home/nginx/domains/pijanitvor.com/public)
    Jan 22 01:00:02 tvor-ocean CROND[18275]: (root) CMD (sleep 259s ; wget -O - -q -t 1 http://shop.pijanitvor.com/wp-cron.php?doing_wp_cron=1 > /dev/null 2>&1)
    Jan 22 01:01:01 tvor-ocean CROND[18288]: (root) CMD (run-parts /etc/cron.hourly)
    Jan 22 01:01:01 tvor-ocean CROND[18289]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:01:01 tvor-ocean run-parts(/etc/cron.hourly)[18288]: starting 0anacron
    Jan 22 01:01:01 tvor-ocean anacron[18299]: Anacron started on 2016-01-22
    Jan 22 01:01:01 tvor-ocean anacron[18299]: Normal exit (0 jobs run)
    Jan 22 01:01:01 tvor-ocean run-parts(/etc/cron.hourly)[18301]: finished 0anacron
    Jan 22 01:01:01 tvor-ocean run-parts(/etc/cron.hourly)[18288]: starting 0yum-hourly.cron
    Jan 22 01:01:01 tvor-ocean run-parts(/etc/cron.hourly)[18307]: finished 0yum-hourly.cron
    Jan 22 01:02:01 tvor-ocean CROND[18320]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:03:01 tvor-ocean CROND[18325]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:04:01 tvor-ocean CROND[18411]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:05:01 tvor-ocean CROND[18490]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:05:01 tvor-ocean CROND[18491]: (root) CMD (/usr/bin/chown -R nginx:nginx /home/nginx/domains/pijanitvor.com/public)
    Jan 22 01:06:01 tvor-ocean CROND[18567]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:07:01 tvor-ocean CROND[18646]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:08:01 tvor-ocean CROND[18718]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:09:01 tvor-ocean CROND[18789]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:10:01 tvor-ocean CROND[18864]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:10:01 tvor-ocean CROND[18867]: (root) CMD (/usr/bin/chown -R nginx:nginx /home/nginx/domains/pijanitvor.com/public)
    Jan 22 01:10:01 tvor-ocean CROND[18866]: (root) CMD (/usr/lib64/sa/sa1 1 1)
    Jan 22 01:11:01 tvor-ocean CROND[18942]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:12:01 tvor-ocean CROND[19030]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:13:01 tvor-ocean CROND[19105]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:14:01 tvor-ocean CROND[19183]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:15:01 tvor-ocean CROND[19259]: (root) CMD (sleep 259s ; wget -O - -q -t 1 http://shop.pijanitvor.com/wp-cron.php?doing_wp_cron=1 > /dev/null 2>&1)
    Jan 22 01:15:01 tvor-ocean CROND[19260]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:15:01 tvor-ocean CROND[19261]: (root) CMD (/usr/bin/chown -R nginx:nginx /home/nginx/domains/pijanitvor.com/public)
    Jan 22 01:16:01 tvor-ocean CROND[19334]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:17:01 tvor-ocean CROND[19412]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:18:01 tvor-ocean CROND[19484]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:19:01 tvor-ocean CROND[19555]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:20:01 tvor-ocean CROND[19639]: (root) CMD (/usr/bin/chown -R nginx:nginx /home/nginx/domains/pijanitvor.com/public)
    Jan 22 01:20:01 tvor-ocean CROND[19640]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:20:01 tvor-ocean CROND[19641]: (root) CMD (/usr/lib64/sa/sa1 1 1)
    Jan 22 01:21:01 tvor-ocean CROND[19720]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:22:01 tvor-ocean CROND[19801]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:23:01 tvor-ocean CROND[19872]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:24:01 tvor-ocean CROND[19943]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:25:01 tvor-ocean CROND[20016]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:25:01 tvor-ocean CROND[20018]: (root) CMD (/usr/bin/chown -R nginx:nginx /home/nginx/domains/pijanitvor.com/public)
    Jan 22 01:26:01 tvor-ocean CROND[20089]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:27:01 tvor-ocean CROND[20167]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:28:01 tvor-ocean CROND[20247]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:29:01 tvor-ocean CROND[20322]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:30:01 tvor-ocean CROND[20405]: (root) CMD (/usr/lib64/sa/sa1 1 1)
    Jan 22 01:30:01 tvor-ocean CROND[20406]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:30:01 tvor-ocean CROND[20408]: (root) CMD (sleep 259s ; wget -O - -q -t 1 http://shop.pijanitvor.com/wp-cron.php?doing_wp_cron=1 > /dev/null 2>&1)
    Jan 22 01:30:01 tvor-ocean CROND[20407]: (root) CMD (/usr/bin/chown -R nginx:nginx /home/nginx/domains/pijanitvor.com/public)
    Jan 22 01:31:01 tvor-ocean CROND[20485]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:32:01 tvor-ocean CROND[20563]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:33:01 tvor-ocean CROND[20634]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:34:01 tvor-ocean CROND[20708]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:35:01 tvor-ocean CROND[20785]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:35:01 tvor-ocean CROND[20784]: (root) CMD (/usr/bin/chown -R nginx:nginx /home/nginx/domains/pijanitvor.com/public)
    Jan 22 01:36:01 tvor-ocean CROND[20868]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:37:01 tvor-ocean CROND[20952]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:38:01 tvor-ocean CROND[21027]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:39:01 tvor-ocean CROND[21099]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:40:01 tvor-ocean CROND[21173]: (root) CMD (/usr/bin/chown -R nginx:nginx /home/nginx/domains/pijanitvor.com/public)
    Jan 22 01:40:01 tvor-ocean CROND[21174]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:40:01 tvor-ocean CROND[21175]: (root) CMD (/usr/lib64/sa/sa1 1 1)
    Jan 22 01:41:01 tvor-ocean CROND[21250]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:42:01 tvor-ocean CROND[21327]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:43:01 tvor-ocean CROND[21398]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:44:01 tvor-ocean CROND[21479]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:45:01 tvor-ocean CROND[21557]: (root) CMD (sleep 259s ; wget -O - -q -t 1 http://shop.pijanitvor.com/wp-cron.php?doing_wp_cron=1 > /dev/null 2>&1)
    Jan 22 01:45:01 tvor-ocean CROND[21560]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:45:01 tvor-ocean CROND[21559]: (root) CMD (/usr/bin/chown -R nginx:nginx /home/nginx/domains/pijanitvor.com/public)
    Jan 22 01:46:01 tvor-ocean CROND[21640]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:47:01 tvor-ocean CROND[21719]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:48:01 tvor-ocean CROND[21791]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:49:01 tvor-ocean CROND[21862]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:50:01 tvor-ocean CROND[21939]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:50:01 tvor-ocean CROND[21940]: (root) CMD (/usr/lib64/sa/sa1 1 1)
    Jan 22 01:50:01 tvor-ocean CROND[21941]: (root) CMD (/usr/bin/chown -R nginx:nginx /home/nginx/domains/pijanitvor.com/public)
    Jan 22 01:51:01 tvor-ocean CROND[22016]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:52:01 tvor-ocean CROND[22101]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:53:01 tvor-ocean CROND[22177]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:54:01 tvor-ocean CROND[22254]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:55:01 tvor-ocean CROND[22327]: (root) CMD (/usr/bin/chown -R nginx:nginx /home/nginx/domains/pijanitvor.com/public)
    Jan 22 01:55:01 tvor-ocean CROND[22328]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:56:01 tvor-ocean CROND[22402]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:57:01 tvor-ocean CROND[22480]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:58:01 tvor-ocean CROND[22551]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 01:59:01 tvor-ocean CROND[22622]: (root) CMD (sleep 223s ;/root/tools/wp_updater_shop.pijanitvor.com.sh 2>/dev/null)
    Jan 22 02:00:01 tvor-ocean CROND[22705]: (root) CMD (/usr/bin/chown -R nginx:nginx /home/nginx/domains/pijanitvor.com/public)
    Jan 22 02:00:01 tvor-ocean CROND[22706]: (root) CMD (sleep 259s ; wget -O - -q -t 1 http://shop.pijanitvor.com/wp-cron.php?doing_wp_cron=1 > /dev/null 2>&1)
    Jan 22 02:00:01 tvor-ocean CROND[22704]: (root) CMD (/usr/lib64/sa/sa1 1 1)
    Jan 22 02:01:01 tvor-ocean CROND[22785]: (root) CMD (run-parts /etc/cron.hourly)
    Jan 22 02:01:01 tvor-ocean run-parts(/etc/cron.hourly)[22785]: starting 0anacron
    Jan 22 02:01:01 tvor-ocean anacron[22794]: Anacron started on 2016-01-22
    Jan 22 02:01:01 tvor-ocean anacron[22794]: Normal exit (0 jobs run)
    Jan 22 02:01:01 tvor-ocean run-parts(/etc/cron.hourly)[22796]: finished 0anacron
    Jan 22 02:01:01 tvor-ocean run-parts(/etc/cron.hourly)[22785]: starting 0yum-hourly.cron
    Jan 22 02:01:01 tvor-ocean run-parts(/etc/cron.hourly)[22802]: finished 0yum-hourly.cron

    This is one of e-mail output
    Code:
    /home/nginx/domains/shop.pijanitvor.com/public
    update wp-cli
    2016-01-22 01:58:45 URL:https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar [1469311/1469311] -> "/usr/bin/wp" [1]
    PHP binary:     /usr/local/bin/php
    PHP version:    7.0.2
    php.ini used:   /usr/local/lib/php.ini
    WP-CLI root dir:        phar://wp-cli.phar
    WP-CLI global config:
    WP-CLI project config:
    WP-CLI version: 0.22.0
    21 installed plugins:
      I child-theme-wizard                1.2
      A disable-xml-rpc                   1.0.1
      A login-with-ajax                   3.1.5
      A nginx-helper                      1.9.6
      A optimus                           1.4.5
      A spacer                            2.0
      A sucuri-scanner                    1.7.17
      A autodescription                   2.5.1
      A tinymce-advanced                  4.2.8
      A user-role-editor                  4.22
      A user-switching                    1.0.9
      A admin-bar-user-switching          1.0.6
      A wc-vendors                        1.8.3
      A woo-checkout-field-editor-pro     1.0.9
      A woocommerce                       2.5.0
      A woocommerce-store-toolkit         1.5.3
      A woocommerce-poor-guys-swiss-knife 2.2.4
      A woosidebars                       1.4.3
      A wp-optimize                       1.8.9.10
      A wp-lightbox-2                     3.0.6.2
      A wp-user-avatar                    2.0.4
    
    Legend: I = Inactive, A = Active
    Success: Updated 0/0 plugins.
    Restarting nginx (via systemctl):  [  OK  ]
    Gracefully shutting down php-fpm . done
    Starting php-fpm  done
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,194
    6,789
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,144
    Local Time:
    8:41 AM
    Nginx 1.13.x
    MariaDB 5.5
    which version of centmin mod and when was WP installed via centmin.sh men u option 22 ? as there was a bug in cron schedule for wp auto cron which was fixed a while back in.
    fixed to run every 15 minutes with a random sleep interval for ${DELAYS} for ${vhostname} which would be your wordpress domain

    Code:
    */15 * * * * sleep ${DELAY}s ; wget -O - -q -t 1 http://${vhostname}/wp-cron.php?doing_wp_cron=1 > /dev/null 2>&1
    You can edit this and use a DELAY calculated from output of this command
    Code:
    DELAY=$(echo ${RANDOM:0:3})
    echo $DELAY
    oh reread, it wasn't wp-cron but wordpress update cron, so relevant lines
    set to run every 8 hours
    Code:
    0 */8 * * * sleep ${DELAY}s ;/root/tools/wp_updater_${vhostname}.sh 2>/dev/null
     
    • Like Like x 1
  3. Sunka

    Sunka Active Member

    917
    240
    43
    Oct 31, 2015
    Rijeka, Croatia
    Ratings:
    +388
    Local Time:
    12:41 AM
    Nginx 1.13.3
    MariaDB 10.1.24
    Yep, I changed to run
    * 1 * * 5

    But question is, why is throwing me 57 e-mails and why is executed 57 times (every minute in that hour).
    If is it only for automatically update wordpress and addons, could I just delete it from crontab and update manually via ACP of wordpress?
     
  4. eva2000

    eva2000 Administrator Staff Member

    30,194
    6,789
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,144
    Local Time:
    8:41 AM
    Nginx 1.13.x
    MariaDB 5.5
    cause you incorrectly have * in minute field see Crontab Generator - Generate crontab syntax

    upload_2016-1-23_1-30-43.png

    as opposed to setting the minute field with a value

    upload_2016-1-23_1-31-50.png

    defeats purpose the cron job for more regular and timely wordpress updates !
     
    • Winner Winner x 1