From owner-freebsd-questions Fri Jan 17 14:56:52 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 B14A837B405 for ; Fri, 17 Jan 2003 14:56:50 -0800 (PST) Received: from mail.adelphia.net (pa-plum1b-166.pit.adelphia.net [24.53.161.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id CAB0443E4A for ; Fri, 17 Jan 2003 14:56:44 -0800 (PST) (envelope-from wmoran@potentialtech.com) Received: from potentialtech.com ([172.16.0.95]) by mail.adelphia.net (8.12.3/8.12.3) with ESMTP id h0HMvqAg007781; Fri, 17 Jan 2003 17:57:52 -0500 (EST) (envelope-from wmoran@potentialtech.com) Message-ID: <3E2889E1.8070609@potentialtech.com> Date: Fri, 17 Jan 2003 17:55:29 -0500 From: Bill Moran User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.1) Gecko/20021127 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Gerard Samuel Cc: FreeBSD Questions Subject: Re: Crontab and jobs References: <3E288543.9020708@trini0.org> <20030117223800.GA82138@submonkey.net> <3E2886A0.1040304@trini0.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 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 You probably need the full path to pg_dump. The crontab environment doesn't have a lot of the settings you get in a login shell. > 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 >> >> > -- Bill Moran Potential Technologies http://www.potentialtech.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message