Re: Script works fine from CLI, but not when Cron'd

2008-10-07 Thread Olivier Nicole
> > 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? > > Things started from cron inherit a different PATH. Either add the > approp

Re: Script works fine from CLI, but not when Cron'd

2008-10-07 Thread Jeremy Chadwick
On Tue, Oct 07, 2008 at 10:20:32AM +0100, Marc Coyles wrote: > 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? mysqldump is in /usr/lo

Re: Script works fine from CLI, but not when Cron'd

2008-10-07 Thread Craig Butler
On Tue, 2008-10-07 at 10:20 +0100, Marc Coyles wrote: > 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: > > #!

Re: Script works fine from CLI, but not when Cron'd

2008-10-07 Thread James Seward
On Tue, Oct 7, 2008 at 10:20 AM, Marc Coyles <[EMAIL PROTECTED]> wrote: > 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? Things start

Script works fine from CLI, but not when Cron'd

2008-10-07 Thread Marc Coyles
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 h