running cgi with cron

running cgi with cron

Posted by: snakepimp
Posted on: 2007-02-19 13:29:00

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.

Edited by snakepimp on 02/19/07 01:42 PM (server time).

Re: running cgi with cron

Posted by: snakepimp
Posted on: 2007-02-19 13:53:00

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.

Re: running cgi with cron

Posted by: snakepimp
Posted on: 2007-02-19 14:33:00

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.

Re: running cgi with cron

Posted by: khatfield
Posted on: 2007-02-19 17:13:00

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

Save

Re: running cgi with cron

Posted by: snakepimp
Posted on: 2007-02-20 09:24:00

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.

Re: running cgi with cron

Posted by: snakepimp
Posted on: 2007-02-22 15:40:00

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.

Edited by snakepimp on 02/22/07 03:41 PM (server time).

Re: running cgi with cron

Posted by: anonymous2
Posted on: 2007-02-22 16:04:00

You could try removing .fnord/ everywhere.

What are the symptoms?

Re: running cgi with cron

Posted by: snakepimp
Posted on: 2007-02-23 11:16:00

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.

Tags: cron jobscrontabusr binshelldreamhostserver timei don t knownewbpyexplicitlypythoncgi binlogswikiscriptstgp