hi, everybody!
my web host created a crontab for me with the following entry:
1 1 1-15 7 * /complete-path-to-my-cgi-bin/runThisScript.pl
the script referred to by the crontab:
print "Content-type: text/html\n\n";
open (M, "|/usr/sbin/sendmail -t")
|| die "Could not start the e-mail program: $!\n";
select (M);
print M "To: my_client\@his_domain.com\n";
print M "From: me\@my_domain.com\n";
print M "Subject: Test Script\n\n";
print M "This is to test the crontab.\n\n";
close (M);
# End of script.
some assumptions/facts:
a. the crontab was created by the root user.
b. the path to the perl script i used is correct. it is based on the cgi root environment variable.
c. the perl script is ok. i ran it using a browser with no hitches.
d. errors are sent to the root user's/web host's log, not mine. maybe this means that the crontab is really owned by the root user.
questions:
1. why is the script not being ran by the crontab? is it bcoz the file is owned by the root user and that the root user can not run my scripts.
my apologies for posting this question here. this is more of linux-sys-admin problem. but i need a quick answer and some people here are very quick to respond, aside from being patient to newbies.
thanks in advance.
arnold b. timoteo