Join the community today
Register Now

Mistake in auto protect cron

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

  1. wmtech

    wmtech Active Member

    104
    28
    28
    Jul 22, 2017
    Ratings:
    +77
    Local Time:
    5:04 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

    40,209
    8,894
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,706
    Local Time:
    1:04 AM
    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 Active Member

    104
    28
    28
    Jul 22, 2017
    Ratings:
    +77
    Local Time:
    5:04 PM
    Thank you!
     
..