[thelist] PHP & Chron Jobs

Paul Cohen email at paulcohen.com
Mon Feb 17 09:09:00 CST 2003


Hello All.

I have written a script in php that will auto generate reports from my
database applications.  I asked my host to run a chron job every night and
here is the response I got:

> If you would like to have this chron job setup we will need you
> to do one of two things. Either write this in perl, or setup a
> perl file with a redirect to this php file in a browser.

First, they are running PHP Ver 4.2.3 and I don't think they have the
command line tools configured as is the default in 4.3.

Rewriting this script in Perl is not an option as my skills in Perl aren't
that great, it is a large script and frankly I don't have the time to teach
myself.

The second option seems reasonable, but I don't have a clue how to write a
perl script that would open a browser, run my php script and do it all from
a chron job.  This may seem like a silly question, but where would a browser
open anyway, on the box where the web server is running?

Any thoughts on this problem are appreciated.

Thx,

Paul





More information about the thelist mailing list