Learn about Centmin Mod LEMP Stack today
Register Now

Mistake in auto protect cron

Discussion in 'Bug Reports' started by wmtech, Mar 27, 2018.

  1. wmtech

    wmtech Member

    36
    14
    8
    Jul 22, 2017
    Ratings:
    +28
    Local Time:
    3:28 PM
    There is a small mistake in autoprotect cron causing the script to run twice per day. Since I need to correct it after each install it would be fine if this can be corrected in core:

    This get's added to the cron:
    Code:
    11 */23 * * * /usr/local/src/centminmod/tools/autoprotect.sh 2>/dev/null
    This should be added:
    Code:
    11 23 * * * /usr/local/src/centminmod/tools/autoprotect.sh 2>/dev/null
    Also, even with the output redirection to /dev/null on some (most) servers I get daily e-mails after this cron has run and at some servers I don't get those e-mails. Don't know why but may I suggest to change the script to not output anything except in case of error?
     
  2. eva2000

    eva2000 Administrator Staff Member

    33,668
    7,456
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,461
    Local Time:
    11:28 PM
    Nginx 1.13.x
    MariaDB 5.5
    Actually it was deliberate to run every 23 hours. But i can see you're point. Difference of 1hr doesn't mean much. Will update 123.09beta01 in a sec. To auto update, after 123.09beta01 update, run centmin.sh once and exit and check crontab -l output for updated version.

    i.e.
    Code (Text):
    crontab -l
    0 */4 * * * /usr/bin/cminfo_updater 2>/dev/null
    13 23 * * * /usr/local/src/centminmod/tools/autoprotect.sh >/dev/null 2>&1
    
     
  3. wmtech

    wmtech Member

    36
    14
    8
    Jul 22, 2017
    Ratings:
    +28
    Local Time:
    3:28 PM
    Thank you!
     
..