From owner-freebsd-questions Fri Jan 17 14:55:47 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EF04A37B401 for ; Fri, 17 Jan 2003 14:55:45 -0800 (PST) Received: from smtp.comcast.net (smtp.comcast.net [24.153.64.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 66F7A43EB2 for ; Fri, 17 Jan 2003 14:55:45 -0800 (PST) (envelope-from gsam@trini0.org) Received: from hivemind.trini0.org (bgp626680bgs.brick201.nj.comcast.net [68.39.132.244]) by mtaout04.icomcast.net (iPlanet Messaging Server 5.2 HotFix 1.07 (built Nov 25 2002)) with ESMTP id <0H8V00I8GRNJX0@mtaout04.icomcast.net> for questions@FreeBSD.ORG; Fri, 17 Jan 2003 17:54:55 -0500 (EST) Received: from trini0.org (laptop.trini0.org [192.168.0.5]) by hivemind.trini0.org (Postfix) with ESMTP id 24214C2; Fri, 17 Jan 2003 17:54:55 -0500 (EST) Date: Fri, 17 Jan 2003 17:55:21 -0500 From: Gerard Samuel Subject: Re: Crontab and jobs To: Ceri Davies Cc: FreeBSD Questions Message-id: <3E2889D9.5060100@trini0.org> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT X-Accept-Language: en, en-us, nl, th User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.1) Gecko/20021213 References: <3E288543.9020708@trini0.org> <20030117223800.GA82138@submonkey.net> <3E2886A0.1040304@trini0.org> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Thanks to James and Ceri. Use the full path to pg_dump -> /usr/local/bin/pg_dump Works now. Gerard Samuel wrote: > #!/bin/sh > # > # To back up PostgreSQL database > # > > date=`date '+%Y%m%d-%H%M%S'` > > pg_dump -cO -U user database > /root/db_back/pgsql-$date.sql > > > Ceri Davies wrote: > >> On Fri, Jan 17, 2003 at 05:35:47PM -0500, Gerard Samuel wrote: >> >> >>> Im trying to setup a cron job to back up my db. >>> If I manually execute the script it works fine, but the cron job >>> isn't executing the job. >>> >>> ## Backup PostgreSQL database >>> */1 * * * * /root/bin/pgsql-back >>> 2> /dev/null > /dev/null >>> >>> Anyone notice anything with this crontab entry??? >>> >> >> >> Show us the script. >> It's probably your path. >> >> Ceri >> >> > -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message