Hmmm, Today I noticed that the daily cron job seemed to fire as soon as I lifted the lid on the mac book pro.
It takes a while for the wifi to connect… I just modified the 'pullFromServer' routine below by adding a 10 second sleep before the rsync call. We will see if this fixes the problem. Jerry On Aug 7, 2011, at 7:06 PM, Jerry LeVan wrote: > I am running Lion on a mac book pro. I have a mac mini running Lion and some > Fedora boxen. > > On the mac book pro my daily.local file contains: > > #!/bin/sh > # sync wiki data with server > /usr/local/bin/pullFromServer > > export HOME=/var/root > /usr/bin/printenv > /usr/bin/mail -s "Daily Cron Job" jerry <<DOC > Daily Cron ran on `/bin/date` > DOC > > pullFromServer contains: > > [mbp:~]$ cat /usr/local/bin/pullFromServer > #!/bin/sh > # Must be run as root we will copy the data directory > # from server to mbp > /usr/bin/rsync -auvgo server::macwiki /usr/local/share/moin/mywiki/data > [mbp:~]$ > > I am copying the moin data directory from my 'server' back to the mbp. > ( A crude sync ). > > If I run pullFromServer ( as root ) the data gets pulled back to my mac book > pro. > > When run from the cron job I find in the daily.log file: > ******* > rsync: failed to connect to server: No route to host (65) > rsync error: error in socket IO (code 10) at > /SourceCache/rsync/rsync-42/rsync/clientserver.c(105) [receiver=2.6.9] > ******** > I am running a local name server on the server and in addition there is an > entry for the server > in the hosts file on the macbook pro. > > I am running almost the same code on the Fedora boxes and they connect ok… > > Why is rsync failing when run from cron? > > Thanks for any insights… > > Jerry _______________________________________________ MacOSX-admin mailing list [email protected] http://www.omnigroup.com/mailman/listinfo/macosx-admin
