Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Dec 2007 20:51:00 +0100
From:      Rolf G Nielsen <listreader@lazlarlyricon.com>
To:        David Goodnature <goodnaturenet@hotmail.com>
Cc:        Christian Walther <cptsalek@gmail.com>, freebsd-questions@freebsd.org
Subject:   Re: Cannot get Script to Run Via Crontab
Message-ID:  <476581A4.3020605@lazlarlyricon.com>
In-Reply-To: <14989d6e0712161140h5d614accje0fefd370029b73b@mail.gmail.com>
References:  <BLU127-W2769D67D198ACB69ECC1B5AA610@phx.gbl> <14989d6e0712161140h5d614accje0fefd370029b73b@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Christian Walther wrote:
> Hi,
> 
> On 16/12/2007, David Goodnature <goodnaturenet@hotmail.com> wrote:
> [...]
>> 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.
>>
>> Any help would be appreciated.
>>
> When calling scripts from cron you only have a very minimal PATH,
> something that is /bin:/usr/bin. You have two options: Create a Path
> in Script yourself, and make sure that this is really passed over to
> the Environment your commands are executed in.
> Another option is to exec commands with their full qualified pathname.
> In this case you don't have to care wether or not the path is set up
> properly.
> 
> HTH
> Christian
> _______________________________________________
> 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"
> 
> 
> 

It's also possible to define a PATH variable (and other environment 
variables too, for that matter) in the crontable. Put them at the top of 
  the file, above the actual table.

-- 

Sincerly,

Rolf Nielsen



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?476581A4.3020605>