From owner-freebsd-questions@FreeBSD.ORG Mon Feb 23 18:26:12 2009 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 6D62B106571B for ; Mon, 23 Feb 2009 18:26:12 +0000 (UTC) (envelope-from josephdsimmons@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.25]) by mx1.freebsd.org (Postfix) with ESMTP id F3E458FC3A for ; Mon, 23 Feb 2009 18:26:11 +0000 (UTC) (envelope-from josephdsimmons@gmail.com) Received: by qw-out-2122.google.com with SMTP id 3so591734qwe.7 for ; Mon, 23 Feb 2009 10:26:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=BSA5KzbhSWVKvqacIlRvNMbPc/Km5USssB/S6/9Cdec=; b=qQ8NVtRXiVbviynbIcxuorGujVqWR0E6u/LClSwEd9U9A6TLNO6iNb6k+T0MsLLwat IdjYYpF4yTnDAZeaOjO3yaEZWpPtC0RDGkaYQ+OoibRQvNeDth22mu5e2QMSWT7F+65J Fw7Z4PmOcadu04HN7Xwh+UEWAK9ZhMHT8+Iho= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=FaNlFEnjiQermZ77H4Po37e1qk+r/AC+GcsTky3QdNzkE3gtqOFyz0pV7KCOOikANX CElNNYHzz8nes4Zgq1ep/TM/Roynr0kO8dDJ7NS/peu/59cK5G22lmMka6Mt4KUZQGUf ayS0rYAlA1icMy3mpNfMn5bVO6AwcLOTWTQEU= MIME-Version: 1.0 Received: by 10.229.73.136 with SMTP id q8mr1582778qcj.28.1235413571284; Mon, 23 Feb 2009 10:26:11 -0800 (PST) In-Reply-To: References: <1ba9cd9a0902230937xc817f3dxe26a54b734d5f8ef@mail.gmail.com> Date: Mon, 23 Feb 2009 12:26:11 -0600 Message-ID: <1ba9cd9a0902231026t797dd129t2b54e86bb874bbf0@mail.gmail.com> From: Joseph Simmons To: Christopher Umina , freebsd-questions@freebsd.org, Peter Boosten Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: root's crontab and mysqldump X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Feb 2009 18:26:14 -0000 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 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" >> > >