Issue with svn update using cron job.

I want to update svn code using a nightly job using cron, i have created a job in cron as,

30 17-19 * * 1-5 /home/saprab/svnUpdate.sh <branch> <svnusername> <svnpassword> >> <logfile> 2>&1

svnUpdate.sh :

#!/bin/bash
branch=$1
svnuser=$2
svnpass=$3
cd ${branch}
svn update --username ${svnuser} --password ${svnpass}

i am getting error in logfile as "svn: This client is too old to work with working copy '.'; please get a newer Subversion client"

if i run the same shell script from command line it updates the code where as using cron job its not updating the code.

Check with the commands which, whereis which one you are using in interactive mode and compare with the one of cron (likely in /usr/bin or /usr/sbin...).
You may be using an alias also (to a more recent version...)

1 Like
which svn --version
GNU which v2.16, Copyright (C) 1999 - 2003 Carlo Wood.
GNU which comes with ABSOLUTELY NO WARRANTY;
This program is free software; your freedom to use, change
and distribute this program is protected by the GPL.
whereis svn
svn: /usr/bin/svn /usr/local/bin/svn /usr/share/man/man1/svn.1.gz

please suggest....

---------- Post updated 11-07-12 at 02:23 AM ---------- Previous update was 11-06-12 at 09:38 AM ----------

thanks vbe i have figured it our with your help, when i was using cli to run it was using /usr/local/bin/svn while using cronjob it was using /usr/bin... so i have changed in my script to right path. :b: