From owner-freebsd-questions@FreeBSD.ORG Tue Oct 7 09:20:57 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A80C2106568D for ; Tue, 7 Oct 2008 09:20:57 +0000 (UTC) (envelope-from mcoyles@horbury.wakefield.sch.uk) Received: from smtp1-wak.yhgfl.net (smtp3-wak-ext.yhgfl.net [89.207.208.42]) by mx1.freebsd.org (Postfix) with ESMTP id 27F328FC31 for ; Tue, 7 Oct 2008 09:20:56 +0000 (UTC) (envelope-from mcoyles@horbury.wakefield.sch.uk) Received: from horbury.wakefield.sch.uk ([10.126.96.34]) by smtp1-wak.yhgfl.net (8.13.8/8.13.8/Debian-3) with ESMTP id m979Keoc002865 for ; Tue, 7 Oct 2008 10:20:41 +0100 Received: from ITTEAM02 [10.126.96.253] by horbury.wakefield.sch.uk with ESMTP (SMTPD32-7.07) id A9E3C840088; Tue, 07 Oct 2008 10:20:35 +0100 From: "Marc Coyles" To: Date: Tue, 7 Oct 2008 10:20:32 +0100 Message-ID: <003001c9285d$f2a3a410$d7eaec30$@wakefield.sch.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AckoXfKORgJvVNtbQLmJgnGOlfREeA== Content-Language: en-gb X-YHGfL-MailScanner-Information: Please contact the YHGfL Foundation for more information X-YHGfL-MailScanner: Found to be clean X-YHGfL-MailScanner-MCPCheck: MCP-Clean, MCP-Checker (score=0, required 0.5) X-YHGfL-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.399, required 5, autolearn=not spam, ALL_TRUSTED -1.80, BAYES_00 -2.60) X-MailScanner-From: mcoyles@horbury.wakefield.sch.uk Subject: Script works fine from CLI, but not when Cron'd X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: mcoyles@horbury.wakefield.sch.uk List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Oct 2008 09:20:57 -0000 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