Running cgi with cron


#1

I know I have to declare the environment explicitly, such as:

          • /usr/bin/python /home/.bullcrap/username/www/script.py

but when I run “which cgi” from shell to confirm the directory it resides in, shell gives no response for cgi.
The crontab file includes the following (edited for privacy):

0 4 * * * /home/.bullcrap/username/www/cgi-bin/tgp/cron.cgi --build-with-new

All my other cron jobs in this file are running fine, but I can’t get the cgi to respond. I searched the dreamhost WIKI, these forums, and I searched the application’s documentation, and I can’t find any problems, and I’m a newb, so I don’t know how to check the crontab logs, but it should just work…
additionally, I know all my newline characters are in place, because the subsequent scripts in the crontab file run fine, and this is the first line.

Help me out, y’all!

~Once Greenland melts, it’ll be a different ballgame,
Jeremy.


#2

Ohh, maybe I have to add
/usr/bin/cgi-fcgi
for the environment, duh, it’s fast cgi, is that it?
I’ll find out in 5 minutes…

~Once Greenland melts, it’ll be a different ballgame,
Jeremy.


#3

nope, that didn’t do it, either…set it to run every 15 minutes, no dice…yargh…

~Once Greenland melts, it’ll be a different ballgame,
Jeremy.


#4

Use /usr/bin/perl or whatever the perl path is. I don’t have it in front of me.

Save [color=#CC0000]$97[/color] on Dreamhost plans by using promo code: [color=#CC0000]SRVR97[/color]


#5

Thanks, I tried that, with the cron set to run every 15 minutes, and it didn’t work.
I will let it sit overnight on the regular schedule and see if it runs tomorrow morning.

~Once Greenland melts, it’ll be a different ballgame,
Jeremy.


#6

No dice, any ideas? this crontab, edited for privacy, is below.

0 5 * * * /usr/bin/perl /home/.fnord/secretusername/www/cgi-bin/tgp/cron.cgi --build-with-new
0 6 * * * /usr/bin/python /home/.fnord/secretusername/scripts/sitemap_gen.py --config=/home/.fnord/secretusername/www/config.xml
0 7 * * * /usr/bin/python /home/.fnord/secretusername/scripts/sitemap_gen.py --config=/home/.fnord/secretusername/www/wwwconfig.xml
0 * * * * /dh/cgi-system/php5.cgi /home/.fnord/secretusername/www/adserver/maintenance/maintenance.php

~Once Greenland melts, it’ll be a different ballgame,
Jeremy.


#7

You could try removing .fnord/ everywhere.

What are the symptoms?

----------
[color=#00CC00]ANONYMOUS0 => Max Discount[/color], [color=#6600CC]ANONYMOUS2 => Max Discount less $1[/color] or Cut the code, [color=#CC0000]it’s their birthday:[/color] [color=#00CC00]9999 => $99.99 Off[/color]


#8

my actual home/user directory as provided appears to be

home/.doodle/snakepimp/

I just replaced .doodle, with .fnord. and snakepimp with username.

The paths I am using in the other cron jobs work fine, the python google sitemap gen script runs every day.

My CGI job doesn’t run, with the PERL environment, or any other I can find, specified.

I need that job to run every day, but it won’t.
I have contacted the software developer, and he says everything is right.
I can’t find anything about runing CGI with CRON on dreamhost, but PERL would be the obvious choice, it was the first one I tried, and then the previous reply suggested it, and I set it up that way again after I had been trying other things, but to no avail. doesn’t appear to run with usr/bin/cgi-fcgi specified either… any ideas?

~Once Greenland melts, it’ll be a different ballgame,
Jeremy.