[solved] crontab

Discussion in 'ISPConfig 3 Priority Support' started by Brett Wilton, Jun 11, 2018.

  1. Brett Wilton

    Brett Wilton Member HowtoForge Supporter

    Hello,
    I'm just trying to figure out what may have gone wrong in an upgrade, we upgraded to ISPConfig 3.1.12 on Centos7.5 platform, running a master/master.
    I just wanted to verify that the primary master should have the following in the /etc/crontab file :-
    * * * * * root /usr/local/ispconfig/server/server.sh > /dev/null >> /var/log/ispconfig/cron.log
    I re-added that line and assume I may have deleted that line while adjusting some other scripts ?
    The second relates to the secondary / mirror master does that also need a similar line in the crontab ?
    Regards,
    Brett
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

  3. Brett Wilton

    Brett Wilton Member HowtoForge Supporter

    HI Taleman,
    To get it running I'm using the /etc/crontab file with that line which needs the root user but clearly my install may have deleted the cron jobs potentially.
    running crontab -l as root for me at least returns "no crontab for root".
    An ls of /var/spool/cron has only one getmail file, possibly thats correct I'm not sure where the ispconfig files are meant to be if not /etc/crontab is not meant to be used.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The root crontab on each server shall contain these lines:

    Code:
    * * * * * /usr/local/ispconfig/server/server.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done
    * * * * * /usr/local/ispconfig/server/cron.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done
    You can edit the root crontab with the command 'crontab -e'
     
  5. Brett Wilton

    Brett Wilton Member HowtoForge Supporter

    Thanks Till, I've moved the /etc/crontab entries to crontab -u root -e file with those two lines.
     

Share This Page