[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cron perl script won't sendmail



On Sun, 27 Aug 2000, Security wrote:

> crond likes full pathnames is my first thought. Thats likely why it works
> from the command line and not crond.
> 
> Tom
> 
> >Any ideas why the following won't actually send email when run from cron:
> >
> >#!/usr/bin/perl
> >#
> >
> >open(SENDMAIL,"|sendmail $recipient");

crond runs with the compiled-in default PATH of the shell, usually
PATH=/bin:/usr/bin

"sendmail" is elsewhere.  Using full pathnames to programs is a common
solution.  The alternative is to explicitly set a PATH in the script.


---------------------------------------------------------------------------
Gerard MacNeil, P. Eng                          macneil@supercity.ns.ca
System Administrator
Supercity Internet Services                     http://www.supercity.ns.ca





Reply to: