[thelist] cron (specifically the cgi it runs)

Adrian Fischer adrian at logo-logic.com
Thu Nov 16 04:06:22 CST 2000

Greetings all,

Would appear I'm cap in hand again.

I am trying to get a cron to check my mail file (earlier request this week).
I had it working fine when it was part of my man script and it did what I
wanted. ie check email and when finding certain words would update the db.
Great stuff (and thanks to all).

I used the crontab article in the archives to sus out how to do the crontab
thing from telnet and I rehacked my mail check subs to make a separate .cgi
.  I even got it all installed and the cron actually ran the script and
continues to do so...

However (you just knew there had to be one..),  the only reason I know the
cron is working is because it sends me an error email every time it runs
(15min intervals).

This is what it barfs up"Content-type: text/html"

Now, I'm thinking that this shouldn't be in there anyway as the script is
not printing anything to the screen.  Its just supposed to update the db and
send some emails. If I run the cgi from my browser it doesn't hic up.  But I
can only  assume when its run as a cron that it shouldn't have the
"Content-type: text/html" in it.

If I remove the offending bit of code it doesn't work at all in fact it
gives the dreaded 500 error message.  I checked the actual autoresponder.cgi
script in the archives and it doesn't have the "Content-type: text/html" in
it but that crashes my script as well.

As part of my main script it did exactly what I wanted but I cant get the
thing to work as a standalone with cron.

Feel free to have a look (and laugh) at my feeble attempts at perl and sql
(hey, what do you expect for only 8 weeks of db'ing)

Thanks yet again.

If this thing ever fly's and your ever in down under the beers are on me..



Oh..and rudy, thanks for the offer to check my joins out.  It was only two
tables and I got it working (its part of this thing)

More information about the thelist mailing list