Get the most out of your Centmin Mod LEMP stack
Become a Member

Just Inquiring on Crontab

Discussion in 'Bug Reports' started by ljseals, Feb 8, 2017.

  1. ljseals

    ljseals Member

    101
    24
    18
    Dec 20, 2016
    Ratings:
    +46
    Local Time:
    10:49 PM
    Please fill in any relevant information that applies to you:
    • CentOS Version: i.e. CentOS 7
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: 1.11.8
    • PHP Version Installed: 7.0.14
    • MariaDB MySQL Version Installed: i.e. 10.0.28 or 10.1.20
    • When was last time updated Centmin Mod code base ? : i.e. run centmin.sh menu option 23 submenu option 2 / Today
    Just inquiring, I have updated Centmin a few times as there have been many updates lately. I saw that my crons show down but now I check crontab - e and my crons are not listed anymore.

    Does Centmin delete crons on update? God bless you!



     
  2. eva2000

    eva2000 Administrator Staff Member

    53,223
    12,116
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,654
    Local Time:
    1:49 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    centmin mod doesn't delete cronjobs

    what is output for
    Code (Text):
    crontab -l
    


    and it's -e without space
    Code (Text):
    crontab -e
    
     
  3. ljseals

    ljseals Member

    101
    24
    18
    Dec 20, 2016
    Ratings:
    +46
    Local Time:
    10:49 PM
    Yes, somehow they have been deleted...

    The only thing I have done recently was upgrade Centmin as I have had other things to do...

    Code:
    #crontab
    11 */23 * * * /usr/local/src/centminmod/tools/autoprotect.sh 2>/dev/null
    0 */4 * * * /usr/bin/cminfo_updater 2>/dev/null
    
     

    Attached Files:

    Last edited: Feb 8, 2017
  4. ljseals

    ljseals Member

    101
    24
    18
    Dec 20, 2016
    Ratings:
    +46
    Local Time:
    10:49 PM
    I do have nightly yum updates as well.... Not sure if that matters..
     
  5. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    5:49 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    Once that happened to me.
    I never discovered what was triger.
    Since than I have cron list saved on my hard
     
  6. SFLC

    SFLC Active Member

    223
    59
    28
    Dec 4, 2016
    The Canadas
    Ratings:
    +112
    Local Time:
    5:49 AM
    1
    10
    Ya I do the same, but for me, i was the one that accidentally cleared crontab
     
  7. ljseals

    ljseals Member

    101
    24
    18
    Dec 20, 2016
    Ratings:
    +46
    Local Time:
    10:49 PM
    Well, I did not touch it but somehow it was deleted. I will have to save it for further reference. The only thing that I did was update Centmin Mod... Seems that it stop working about 3 days ago.
     
  8. SFLC

    SFLC Active Member

    223
    59
    28
    Dec 4, 2016
    The Canadas
    Ratings:
    +112
    Local Time:
    5:49 AM
    1
    10
    You're gonna have to look through system logs to see if your cron logs are there and can extract them from the files, last time i had to do this, if i remember correctly there was no record of run intervals, just the commands.
     
  9. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    5:49 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    Yep, commands you can see in cron log.
    Use number what you have to.
    Code:
    tail -10 /var/log/cron
     
  10. eva2000

    eva2000 Administrator Staff Member

    53,223
    12,116
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,654
    Local Time:
    1:49 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    nothing in Centmin Mod updates would delete cronjobs and no yum updates i believe

    check your yum update history and see if anything in past 3 days was updated
    Code (Text):
    yum history list
    

    find transaction id from list and type
    Code (Text):
    yum history info XX
    

    where XX is transaction id from history list
     
  11. eva2000

    eva2000 Administrator Staff Member

    53,223
    12,116
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,654
    Local Time:
    1:49 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    also search you command history for references to cron to see if you had any typos that could of wiped them
    Code (Text):
    history | grep cron
    
     
  12. ljseals

    ljseals Member

    101
    24
    18
    Dec 20, 2016
    Ratings:
    +46
    Local Time:
    10:49 PM
    I am not going to worry about it. I try to keep it updated but it seems to be fine. I just added back the cron jobs that I made so it is fine. Thanks for your help! God bless you!

    Code:
    Loaded plugins: fastestmirror, priorities
    ID     | Command line             | Date and time    | Action(s)      | Altered
    -------------------------------------------------------------------------------
        39 |                          | 2017-02-06 09:15 | Update         |    2
        38 |                          | 2017-02-02 05:23 | Update         |    2
        37 | update --disableplugin=p | 2017-01-20 04:25 | I, U           |    6
        36 |                          | 2017-01-19 03:38 | Update         |   22
        35 | -y install yum-cron      | 2017-01-17 15:13 | Install        |    1
        34 | update --disableplugin=p | 2017-01-17 12:01 | Update         |    1
        33 | -y -q install haveged rn | 2017-01-17 11:50 | Install        |    2
        32 | -q -y install pure-ftpd  | 2017-01-17 11:50 | Install        |    3
        31 | -y install perl-LWP-Prot | 2017-01-17 11:49 | Install        |    2
        30 | -q -y install libmemcach | 2017-01-17 11:48 | Install        |    2
        29 | -q -y install postfix-pe | 2017-01-17 11:47 | Install        |    4
        28 | -y install mailx         | 2017-01-17 11:47 | Install        |    1
        27 | -y install uw-imap-devel | 2017-01-17 11:29 | Install        |    2
        26 | -q -y install libtidy li | 2017-01-17 11:29 | Install        |    2
        25 | -q -y install libicu lib | 2017-01-17 11:28 | Install        |    2
        24 | -q -y install libxslt li | 2017-01-17 11:28 | Install        |    4
        23 | -q -y install unixODBC-d | 2017-01-17 11:28 | Install        |    4
        22 | -q -y install fio --disa | 2017-01-17 11:28 | Install        |    7
        21 | -y install postfix net-s | 2017-01-17 11:27 | Install        |    3
        20 | -q -y install perl-DBD-M | 2017-01-17 11:27 | Install        |    1
    
    Code:
    Loaded plugins: fastestmirror, priorities
    Transaction ID : 38
    Begin time     : Thu Feb  2 05:23:09 2017
    Begin rpmdb    : 705:e19b86b9c327c8e39ce092674ffe92a8f432ae7d
    End time       :            05:23:10 2017 (1 seconds)
    End rpmdb      : 705:82e6e8f5d48233ab4d78f9c3bf0e10dd7279a90e
    User           : root <root>
    Return-Code    : Success
    Transaction performed with:
        Installed     rpm-4.11.3-21.el7.x86_64                      @base
        Installed     yum-3.4.3-150.el7.centos.noarch               @base
        Installed     yum-metadata-parser-1.1.4-10.el7.x86_64       installed
        Installed     yum-plugin-fastestmirror-1.1.31-40.el7.noarch @base
    Packages Altered:
        Updated libtiff-4.0.3-25.el7_2.x86_64       @base
        Update          4.0.3-27.el7_3.x86_64       @updates
        Updated libtiff-devel-4.0.3-25.el7_2.x86_64 @base
        Update                4.0.3-27.el7_3.x86_64 @updates
    
    Code:
       24  [17.01.17] 15:13:44   yum -y install yum-cron
       25  [17.01.17] 15:14:09   chkconfig yum-cron on
       28  [17.01.17] 15:55:45   sed -i "s|^email_to = root|email_to = ${EMAIL}|" /etc/yum/yum-cron.conf
       29  [17.01.17] 15:56:01   sed -i 's|^update_messages = no|update_messages = yes|' /etc/yum/yum-cron.conf
       30  [17.01.17] 15:56:12   sed -i 's|^download_updates = no|download_updates = yes|' /etc/yum/yum-cron.conf
       31  [17.01.17] 15:56:27   sed -i 's|^apply_updates = no|apply_updates = yes|' /etc/yum/yum-cron.conf
       32  [17.01.17] 15:56:44   sed -i 's|^emit_via = stdio|emit_via = email|' /etc/yum/yum-cron.conf
       33  [17.01.17] 15:56:54   sed -i "s|^email_to = root|email_to = ${EMAIL}|" /etc/yum/yum-cron-hourly.conf
       34  [17.01.17] 15:57:08   sed -i 's|^update_cmd = default|update_cmd = security|' /etc/yum/yum-cron-hourly.conf
       35  [17.01.17] 15:57:19   sed -i 's|^update_messages = no|update_messages = yes|' /etc/yum/yum-cron-hourly.conf
       36  [17.01.17] 15:57:33   sed -i 's|^download_updates = no|download_updates = yes|' /etc/yum/yum-cron-hourly.conf
       37  [17.01.17] 15:57:48   sed -i 's|^apply_updates = no|apply_updates = yes|' /etc/yum/yum-cron-hourly.conf
       38  [17.01.17] 15:58:01   sed -i 's|^emit_via = stdio|emit_via = email|' /etc/yum/yum-cron-hourly.conf
       39  [17.01.17] 15:58:13   egrep '^email_to|^update_messages|^download_updates|^apply_updates|^emit_via' /etc/yum/yum-cron.conf
       40  [17.01.17] 16:00:40    egrep '^email_to|^update_cmd|^update_messages|^download_updates|^apply_updates|^emit_via' /etc/yum/yum-cron-hourly.conf
       41  [17.01.17] 16:01:16   service yum-cron restart
       42  [17.01.17] 16:02:06   grep yum.cron /var/log/cron | tail -10
       66  [18.01.17] 02:59:00   crontab -e
       71  [18.01.17] 03:05:56   crontab -e
       76  [18.01.17] 03:30:05   crontab -e
       77  [18.01.17] 03:34:17   crontab -l
       78  [18.01.17] 03:35:35   tail -100 /var/log/cron
       79  [18.01.17] 05:02:41   crontab -l
       80  [18.01.17] 05:03:00   tail -100 /var/log/cron
      189  [28.01.17] 10:28:38   crontab-e
      190  [28.01.17] 10:28:43   crontab -e
      195  [04.02.17] 18:01:40   crontab
      212  [07.02.17] 10:25:44   crontab -e
      213  [07.02.17] 10:26:34    crontab -e
      214  [07.02.17] 10:33:07   crontab -e
      215  [07.02.17] 10:50:16   crontab -l
      216  [07.02.17] 10:55:43   #crontab
      220  [07.02.17] 11:06:26   crontab -e
      221  [07.02.17] 12:26:53   crontab -l
      222  [07.02.17] 13:34:22   crontab -e
      223  [07.02.17] 14:25:27   crontab -ls
      234  [08.02.17] 07:06:22       35 | -y install yum-cron      | 2017-01-17 15:13 | Install        |    1
      252  [08.02.17] 07:13:53   crontav -e
      253  [08.02.17] 07:13:59   crontab -e
      254  [08.02.17] 07:16:01   history | grep cron
    
     
    Last edited: Feb 8, 2017