Welcome to Centmin Mod Community
Register Now

Mistake in auto protect cron

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

  1. wmtech

    wmtech Member

    64
    17
    8
    Jul 22, 2017
    Ratings:
    +39
    Local Time:
    11:33 AM
    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

    35,617
    7,844
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +12,093
    Local Time:
    7:33 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    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

    64
    17
    8
    Jul 22, 2017
    Ratings:
    +39
    Local Time:
    11:33 AM
    Thank you!
     
..