can't get cron to work

Discussion in 'ISPConfig 3 Priority Support' started by jpcyrenne, Oct 23, 2014.

  1. jpcyrenne

    jpcyrenne Member HowtoForge Supporter

    Good Day,

    Running ISPConfig 3.0.5.4p3 on a Centos6.5 VPS.

    I built a script to 'rsync -a' a server site to a second server for failober purposes. It runs well if I launch it manually but can't get cron to run it every night?

    script: /root/syncSilanis.sh
    -rwxr-xr-x 1 root root 1672 Oct 21 05:15 syncSilanis.sh

    cron:
    ------
    * * * * * /usr/local/ispconfig/server/server.sh &> /dev/null
    30 00 * * * /usr/local/ispconfig/server/cron_daily.sh &> /dev/null

    01 01 * * * /root/syncSilanis.sh


    ----------------------
    I use crontab -e

    - I've tried adding root before (no success):
    01 01 * * * root /root/syncSilanis.sh

    - I've tried adding sh before (no success):
    01 01 * * * sh /root/syncSilanis.sh

    - I've tried adding this to cron (no success):
    SHELL=/bin/bash
    PATH=/sbin:/bin:/usr/sbin:/usr/local/bin:/usr/bin
    MAILTO=me@somewhere.com
    HOME=/

    - I've added > /root/cron.txt (no output):
    24 11 * * * /root/syncSilanis.sh > /root/cron.txt

    Maybe just not calling the right binary?

    Thanks ahead,

    JP
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Do you use absolute paths for everything inside the file syncSilanis.sh incl. the absolute path to the rsync binary?
     
  3. jpcyrenne

    jpcyrenne Member HowtoForge Supporter

    Thank you, seems to have fixed it.

    /usr/bin/rsync
    /bin/chown

    JP
     

Share This Page