Date: Fri, 12 Sep 2003 18:01:45 -0400 From: Gerard Samuel <gsam@trini0.org> To: FreeBSD Questions <questions@freebsd.org> Subject: Re: Script doesn't complete via Cron Message-ID: <3F624249.6090300@trini0.org> In-Reply-To: <3F620FD4.1090207@trini0.org> References: <3F620FD4.1090207@trini0.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Ok, I figured out the problem. The step that creates the zip file, wasn't creating the zip file, because, I wasn't using the full path to the zip command. Since there was no files to scp, the script ended. Once I started using /usr/local/bin/zip, things started working correctly with cron. Gerard Samuel wrote: > Script -> > -------- > #!/bin/sh > # > # To roll up a zip file of source code > # > > date=`date '+%Y-%m-%d'` > > cd ~/temp > rm -rf foo_dev foo.zip > export CVS_RSH=ssh > export CVSROOT=:ext:xxx@xxx.xxx.xxx:/xxx/yyy/zzz > cvs -Q export -D $date -d foo_dev foo > zip -q -r foo foo_dev > scp -q foo.zip server_name: > rm -rf foo_dev foo.zip > > ------ > > Cron job -> > ------ > # export, zip up and scp foo source to server_name > 17 14 * * * /home/bar/bin/export-foo > 2> /dev/null > /dev/null > ------ > > When I execute the script by hand, it completes without any problems. > When I let a cronjob handle it, it doesn't scp the zip file to the > remote server. > I don't get any errors in /var/log/auth.log or /var/log/messages > Anyone has any ideas on how to fix this up? > > Thanks
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F624249.6090300>