PHP with Cron
Posted on 2004-09-03
I'm trying to create a cron job to run a script at midnight every night, however I've not been able to successfully get it to run.
So I tried running the script in shell by doing the following:
The output is...
<b>Fatel error</b>: Failed opening required 'TimeZone.php' (include_path='.:/opt/php-4.0.6/lib/php') in <b>/usr/local/home/httpd/docs/affcheck/dcm/Classes/Date/Date.php</b> on line <b>25</b><br>
The script TimeZone.php is in the same dir as the Date.php script and is called like this:
The Date.php script is called from the grab.php (i.e the script that is cron'd) like this:
Also the script runs fine in the browser with no errors.
* I checked /usr/bin/php was the correct dir by running which php in shell
Any help would be great.
Also this is my first cron job and I'm not great with *nix either, so simple is good :-)