Date: Mon, 23 Feb 2009 12:26:11 -0600 From: Joseph Simmons <josephdsimmons@gmail.com> To: Christopher Umina <chris@easymac.org>, freebsd-questions@freebsd.org, Peter Boosten <peter@boosten.org> Subject: Re: root's crontab and mysqldump Message-ID: <1ba9cd9a0902231026t797dd129t2b54e86bb874bbf0@mail.gmail.com> In-Reply-To: <BC19BF4C-9A21-45F0-B140-0552761941E7@easymac.org> References: <1ba9cd9a0902230937xc817f3dxe26a54b734d5f8ef@mail.gmail.com> <BC19BF4C-9A21-45F0-B140-0552761941E7@easymac.org>
next in thread | previous in thread | raw e-mail | index | archive | help
I added the full path and the result didn't change. I can still see it running in the log but the script doesn't appear to be doing anything. I have the following variables set in the root's crontab SHELL=/usr/local/bin/bash PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin HOME=/root The file I'd like to execuate has the following permissions rwxr-x--- it's own by root, the contents of the file are below #!/usr/local/bin/bash date_time=$(/bin/date "+%Y-%m-%d-%H-%M-%S") /usr/local/bin/mysqldump -u backup_user -pPassWord DataBase >/backup/db/DataBase-$date_time On Mon, Feb 23, 2009 at 12:06 PM, Christopher Umina <chris@easymac.org>wrote: > be sure to use the absolute path to the command you're using. > > (/usr/local/bin/mysqldump if i remember correctly) > > crontab runs with a lesser path than your shell > > > On Feb 23, 2009, at 12:37 PM, Joseph Simmons wrote: > > I'm running a FreeBSD 7.0-RELEASE system and am trying to run a mysqldump >> as root. I've written a very simple script that does the dump, it works >> fine >> when I run it manually, but when I include it in the root's crontab >> (crontab >> -e) or in the system's crontab (/etc/crontab), I see that the script is >> ran >> in the log but it doesn't do anything. I'm able to run other cron jobs as >> root without any problem. This script is only suppose to create a file >> containing the dumped database. >> _______________________________________________ >> freebsd-questions@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-questions >> To unsubscribe, send any mail to " >> freebsd-questions-unsubscribe@freebsd.org" >> > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1ba9cd9a0902231026t797dd129t2b54e86bb874bbf0>