Cannot get Script to Run Via Crontab

Rolf G Nielsen listreader at lazlarlyricon.com
Sun Dec 16 11:51:03 PST 2007


Christian Walther wrote:
> Hi,
> 
> On 16/12/2007, David Goodnature <goodnaturenet at 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 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at 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


More information about the freebsd-questions mailing list