LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   rsync and contab (https://www.linuxquestions.org/questions/linux-newbie-8/rsync-and-contab-184947/)

anthill 05-23-2004 05:09 PM

rsync and contab
 
Hi,

I am running a couple of mirrors from my server. At the moment I am updating the sites manually using rsync, but i am going on holiday soon, and need to do this automatically.

I have tried inserting a script into cron.daily but it doesn't seem to work. The script being

#!/bin/sh

rsync -rtzp ftp.mirror.org::mirror /var/www/mirror

so i changed it to #!/bin/bash, but that didn't work either...What am i doing wrong?

Thanks for reading this, sorry for my newbieism.

Ant

ToniT 05-23-2004 05:48 PM

Is there rsync in the PATH that is passed to the cronjob? Do you have any mail from your cron? Have you chmodded the script to have an executable flag on?

anthill 05-24-2004 04:16 AM

Hi

I just popped the file into the cron.daily directory.

I don't have any mail from the cron

I haven't chmoded the file, would there be a log created if it couldn't perfom the action? i.e. telling me the privileges are all wrong?

Thanks for your reply

Ant

ToniT 05-24-2004 10:32 AM

Well, according to the sources of run-parts (the program that is used in debian cron), the files without executable flag on are silently ignored.

SuSE uses a script named 'run-crons', that gives a warning message: "WARNING: $SCRIPT is not executable, script is ignored !".

Redhat(atleast 7.3; I don't have access to other RH boxes at the moment) has a script that is similar to the debian run-parts, and it also silently ignores the files without -x flag.

Conclusion: It doesn't work without the x flag, and it doesn't necessary inform a thing about it.


All times are GMT -5. The time now is 09:47 PM.