Perl script with `command` in cron not right

K Creason kevinc at gci.net
Thu May 11 19:08:57 CDT 2000


This may seem a little twisted, if so, I'd appreciate being straightened
out. I've cross posted this with the Perl user group and the linux group,
because I'm not sure where the problem lies.

I have a Perl script I scheduled in cron.
BUT (of course there's a but to this)
this line:
$r=`cat /home/911/alert.msg |smbclient -M $mac[$c] -R wins -U "911 Alert"`;

will do every thing up to the included pipe command. The script works
perfect from the command line, cron just doesn't do that part.
I know cron does some of it's won redirections, so is it the multiple
redirect*s that go on in a cron job?
I've tried the cron job scheduled like these two ways, following my HP-UX
experience:
* * * * * /home/911/ptel.pl >/home/911/ptel.log
and
* * * * *  /home/911/ptel.pl

It's never logged a thing to the cron piped log, so maybe that HP function
isn't included in linux. I 've altered the perl line to include full path to
the smbclient binary, no fix the problem.
The cat function works, the alert.msg file is always updated.


Computers can figure out all sorts of problems except the things in the
world that just don't add up.--James Magoy

=================================================
Mailing list info:  If at any time you wish to (un|re)subscribe to
the list send the request to majordomo at hfb.pm.org.  All requests
should be in the body, and look like such
                  subscribe anchorage-pm-list
                  unsubscribe anchorage-pm-list



More information about the Anchorage-pm mailing list