From owner-freebsd-questions@FreeBSD.ORG Mon Dec 17 12:19:16 2007 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 D41BF16A420 for ; Mon, 17 Dec 2007 12:19:16 +0000 (UTC) (envelope-from roberthuff@rcn.com) Received: from smtp02.lnh.mail.rcn.net (smtp02.lnh.mail.rcn.net [207.172.157.102]) by mx1.freebsd.org (Postfix) with ESMTP id A4CCF13C4CC for ; Mon, 17 Dec 2007 12:19:16 +0000 (UTC) (envelope-from roberthuff@rcn.com) Received: from mr08.lnh.mail.rcn.net ([207.172.157.28]) by smtp02.lnh.mail.rcn.net with ESMTP; 17 Dec 2007 07:19:15 -0500 Received: from smtp01.lnh.mail.rcn.net (smtp01.lnh.mail.rcn.net [207.172.4.11]) by mr08.lnh.mail.rcn.net (MOS 3.8.6-GA) with ESMTP id JLQ68083; Mon, 17 Dec 2007 07:19:15 -0500 (EST) Received: from 209-6-22-188.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com (HELO jerusalem.litteratus.org.litteratus.org) ([209.6.22.188]) by smtp01.lnh.mail.rcn.net with ESMTP; 17 Dec 2007 07:18:10 -0500 From: Robert Huff MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18278.26945.843337.942745@jerusalem.litteratus.org> Date: Mon, 17 Dec 2007 07:19:13 -0500 To: Giorgos Keramidas In-Reply-To: <20071217075424.GB2398@kobe.laptop> References: <20071217075424.GB2398@kobe.laptop> X-Mailer: VM 7.17 under 21.5 (beta28) "fuki" XEmacs Lucid X-Junkmail-Whitelist: YES (by domain whitelist at mr08.lnh.mail.rcn.net) Cc: freebsd-questions@freebsd.org, David Goodnature Subject: Re: Cannot get Script to Run Via Crontab 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, 17 Dec 2007 12:19:16 -0000 Giorgos Keramidas writes: > > The lines from my script that are causing the problem are: > > > > my $scomd = "/usr/local/bin/ps2pdf -dPDFSETTINGS=/prepress -dProcessColorModel=/DeviceGray -dAutoRotatePages=/PageByPage -dDownsampleMonoImages=true -dMonoImageDownsampleType=/Average -dMonoImageDownsampleThreshold=1.5 -dMonoImageResolution=600 ".$inpath.$cur_ps_files[0]." ".$outpath.$pdffilename; > > > > The cron message to mail/root ends with: > > > > exec: ps2pdf12: not found > > > > I am assuming that cron cannot find a path or a config file for > > ghostscript, but I don't have any idea how to fix this problem. > > Yes. That's what is happenning. The default PATH of cron jobs doesn't > include `/usr/local/bin', but you have lots of options: > > 1) Add it to the crontab file > > 2) Modify the default path in your Perl script: Allow me to recommend the second, as it will not disturb other cron programs that may be expecting the default path. Robert Huff