Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Oct 2008 10:20:32 +0100
From:      "Marc Coyles" <mcoyles@horbury.wakefield.sch.uk>
To:        <freebsd-questions@freebsd.org>
Subject:   Script works fine from CLI, but not when Cron'd
Message-ID:  <003001c9285d$f2a3a410$d7eaec30$@wakefield.sch.uk>

next in thread | raw e-mail | index | archive | help
I've got a script to backup my MySQL databases, which works absolutely
fine from the command line, but when I add it in to root's cronjobs it
always fails with "mysqldump: not found" - what am I doing wrong?

Script as follows:

#!/bin/sh
USER=
PASS=

mysqldump --opt -h localhost -u $USER -p$PASS horbury_dppd06
>/home/horbury/backup_mysql/dppd06.sql


And that's it...
When run as root from CLI, works with no errors. When run from cron as
root, get the "not found" problem.


Marc A Coyles - Horbury School ICT Support Team
Mbl: 07850 518106
Land: 01924 282740 ext 730
Helpdesk: 01924 282740 ext 2000
 






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?003001c9285d$f2a3a410$d7eaec30$>