Want to subscribe to topics you're interested in?
Become a Member

autoprotect.sh and cron

Discussion in 'Beta release code' started by SeaTea, Oct 28, 2016.

  1. SeaTea

    SeaTea Premium Member Premium Member

    49
    13
    8
    Feb 20, 2015
    the Netherlands
    Ratings:
    +28
    Local Time:
    8:53 PM
    Nginx:1.11
    MariaDB-10
    I have installed centminmod on 2 vps. I noticed every night 2 emails from both servers, one at 00:11 UTC and one at 23:11 UTC with results of autoprotect.sh.

    When I checked cron, I found:
    Code (Text):
    [root@vps /]# crontab -l
    11 */23 * * * /usr/local/src/centminmod/tools/autoprotect.sh 2>/dev/null
    


    This means, (every day at 00:11UTC -and every 23hours after that-) run this script.
    Why do you use */23 for the hours and not at a fixed time ?
    Is this a typo or intended ?
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,193
    6,789
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,143
    Local Time:
    4:53 AM
    Nginx 1.13.x
    MariaDB 5.5
    not typo, just set that way, you can change the crontime to suit your needs :)
     
  3. SeaTea

    SeaTea Premium Member Premium Member

    49
    13
    8
    Feb 20, 2015
    the Netherlands
    Ratings:
    +28
    Local Time:
    8:53 PM
    Nginx:1.11
    MariaDB-10
    What is the best place to change this ?
    Probably if I change this with crontab -e, it will change again with an update of centmin ?
    (I could not find the file where the cronjob is setup)
     
  4. eva2000

    eva2000 Administrator Staff Member

    30,193
    6,789
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,143
    Local Time:
    4:53 AM
    Nginx 1.13.x
    MariaDB 5.5
    Best way and no doesn't get changed on updates