Doesn't run as a cronjob...

Hi!

I have a svn backup script that works perfectly if I execute it from the command line but if I set it as a cronjob to run at night, only part of the code works.

So, basically the scripts starts by deleting the folder yesterday and then moves the folder today to the folder yesterday. When that is finished it start the backup.

1st part

#!/bin/sh
date > begin.txt

rm -rv /network/ftp-backup/Svn/Yesterday/* 
wait
rm -rv /network/ftp-backup/Svn/svnbackup/Yesterday/.??*
wait
mv -v /network/ftp-backup/Svn/Today/* /network/ftp-backup/Svn/Yesterday/
wait
mv -v /network/ftp-backup/Svn/Today/.??* /network/ftp-backup/Svn/Yesterday/
wait

2nd part

ls -a /esp-server/svn/ > list.txt

cat list.txt | while read x; do
sudo svn-hot-backup /esp-server/svn/$x /network/ftp-backup/Svn/Today
wait

done

wait 

date > end.txt

the 1st part does not work from the cronjob table and the second part runs with no problems. I even split the scripts but it still does not run.

Any idea why?

thanks!

Who executes the job?
Who are you when executing the script interactively?

---------- Post updated at 15:25 ---------- Previous update was at 15:24 ----------

What OS?

1- Root
2- Root
3- Ubuntu 8.04 64bits Server Edition

Danke!

I missed...

rm -rv /network/ftp-backup/Svn/Yesterday/* 
wait
etc...

You are not talking about NFS mounted filesystems are you?

it was mounted with cifs...samba filesystem but what difference would this make?