Re: cron perl script won't sendmail

2000-08-27 Thread Gerard MacNeil
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  [EMAIL PROTECTED]
System Administrator
Supercity Internet Services http://www.supercity.ns.ca






Re: cron perl script won't sendmail

2000-08-27 Thread Gerard MacNeil

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  [EMAIL PROTECTED]
System Administrator
Supercity Internet Services http://www.supercity.ns.ca




--  
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: cron perl script won't sendmail

2000-08-27 Thread Security
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");
>print SENDMAIL "From: WVFD EMS Dispatch <[EMAIL PROTECTED]>\n";
>print SENDMAIL "To: WVFD EMT <$recipient>\n";
>print SENDMAIL "Subject: Possible EMS call\n";
>print SENDMAIL "\n";
>print SENDMAIL "SAEMS case $case at $address for $desc.\n";
>print SENDMAIL "SAEMS is sending $units units\n";
>close(SENDMAIL);
>
>
>I'm trying to tie pager notification to a website, and it runs fine on the
>command line, but not from cron.  Assume that all variables are properly
>populated.
>
>Thanks,
>
>Pete
>
>--
>Peter J. Templin, Jr., CCNA, CCDA
>VP Networking
>
>On-Line Internet Services - URDirect.net
>A division of Global On-Line Computers
>5606 Randolph Blvd [EMAIL PROTECTED]
>San Antonio, TX 78233  (210)692-9911
>
>
>--
>To UNSUBSCRIBE, email to [EMAIL PROTECTED]
>with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]






cron perl script won't sendmail

2000-08-27 Thread Pete Templin

Any ideas why the following won't actually send email when run from cron:

#!/usr/bin/perl
#

open(SENDMAIL,"|sendmail $recipient");
print SENDMAIL "From: WVFD EMS Dispatch <[EMAIL PROTECTED]>\n";
print SENDMAIL "To: WVFD EMT <$recipient>\n";
print SENDMAIL "Subject: Possible EMS call\n";
print SENDMAIL "\n";
print SENDMAIL "SAEMS case $case at $address for $desc.\n";
print SENDMAIL "SAEMS is sending $units units\n";
close(SENDMAIL);


I'm trying to tie pager notification to a website, and it runs fine on the
command line, but not from cron.  Assume that all variables are properly
populated.

Thanks,

Pete

--
Peter J. Templin, Jr., CCNA, CCDA
VP Networking

On-Line Internet Services - URDirect.net
A division of Global On-Line Computers
5606 Randolph Blvd  [EMAIL PROTECTED]
San Antonio, TX 78233   (210)692-9911




Re: cron perl script won't sendmail

2000-08-27 Thread Security

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");
>print SENDMAIL "From: WVFD EMS Dispatch \n";
>print SENDMAIL "To: WVFD EMT <$recipient>\n";
>print SENDMAIL "Subject: Possible EMS call\n";
>print SENDMAIL "\n";
>print SENDMAIL "SAEMS case $case at $address for $desc.\n";
>print SENDMAIL "SAEMS is sending $units units\n";
>close(SENDMAIL);
>
>
>I'm trying to tie pager notification to a website, and it runs fine on the
>command line, but not from cron.  Assume that all variables are properly
>populated.
>
>Thanks,
>
>Pete
>
>--
>Peter J. Templin, Jr., CCNA, CCDA
>VP Networking
>
>On-Line Internet Services - URDirect.net
>A division of Global On-Line Computers
>5606 Randolph Blvd [EMAIL PROTECTED]
>San Antonio, TX 78233  (210)692-9911
>
>
>--
>To UNSUBSCRIBE, email to [EMAIL PROTECTED]
>with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




--  
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




cron perl script won't sendmail

2000-08-27 Thread Pete Templin


Any ideas why the following won't actually send email when run from cron:

#!/usr/bin/perl
#

open(SENDMAIL,"|sendmail $recipient");
print SENDMAIL "From: WVFD EMS Dispatch \n";
print SENDMAIL "To: WVFD EMT <$recipient>\n";
print SENDMAIL "Subject: Possible EMS call\n";
print SENDMAIL "\n";
print SENDMAIL "SAEMS case $case at $address for $desc.\n";
print SENDMAIL "SAEMS is sending $units units\n";
close(SENDMAIL);


I'm trying to tie pager notification to a website, and it runs fine on the
command line, but not from cron.  Assume that all variables are properly
populated.

Thanks,

Pete

--
Peter J. Templin, Jr., CCNA, CCDA
VP Networking

On-Line Internet Services - URDirect.net
A division of Global On-Line Computers
5606 Randolph Blvd  [EMAIL PROTECTED]
San Antonio, TX 78233   (210)692-9911


--  
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]