Subject: RE: crontab problem? Date: Thu, 13 Feb 2003 12:25:45 -0600 Message-ID: <E0EDC9B3C760B44DADD96F6D4F1CAE9601906379@Mail.aos5.com> From: "Kevin Hodle" <kevinh@aos5.com>
Did you put this crontab entry in /etc/crontab, or a users crontab? The
user the cron job is running as might not have permissions on the
directory you trying redirect the output to. There is an entry in the
crontab file that specifies the user the job will run as, for instance,
intead of
5 * * * * /usr/local/apache/cgi-bin/cal.pl
You would use:
5 * * * * root /usr/local/apache/cgi-bin/cal.pl (the apache/http user
might work as well)
If you are running it from a user crontab, try using /etc/crontab
instead.
Kevin Hodle
Alexander Open Systems
Network Operations Center
kevinh@aos5.com
-----Original Message-----
From: Joe-Cho [mailto:joecho@everestkc.net]
Sent: Thursday, February 13, 2003 12:10 PM
To: kclug@kclug.org
Subject: crontab problem?
Hello,
I have a quick question about crontab.
I have a small script that I made. I would like to execute this script
every hour. I did it on my crontab file like:
5 * * * * /usr/local/apache/cgi-bin/cal.cgi >
/usr/local/apache/htdocs/cal.html
It execute the script cal.cgi every hour.
but the problem is that it doesn't have any content on cal.html it has
zero byte in it.
So, I created a perl script which execute this script.
I named /usr/local/apache/cgi-bin/cal.pl
I can excute this script manually on the current directory that is
/usr/local/apache/cgi-bin/, but if I try on other directory, it
complains it.
It works fine if I do manually execute this script perl cal.pl
So, I put this script in the crontab like this:
5 * * * * /usr/local/apache/cgi-bin/cal.pl
Again, it execute this with zero byte.
All it does inside of the file cal.pl is to execute this comamand like
this:
/usr/local/apache/cgi-bin/cal.cgi > /usr/local/apache/htdocs/cal.html
Any suggestion??
Thanks in advance,
Joe Cho
joecho@everestkc.net
ksjoecho@yahoo.com
a member of kclug.