Forum Moderators: coopster
I had to set a CRON job to run every hour. However, I seemed to be having some problem with it. After a few discussions here at WebmasterWorld at [webmasterworld.com...] , I still seem to be having trouble.
I seem to be getting the following error:
/home/accountname/public_html/foldername/hourly_update.php: line 1:?php
: No such file or directory
/home/accountname/public_html/foldername/hourly_update.php: line 2: syntax error near unexpected token `'includes/application_top.php''
/home/accountname/public_html/foldername/hourly_update.php: line 2: ` require('includes/application_top.php');
'
Can someone see the mistake here?
Thanks
Anand
Try one of two things:
1. Put #!/path/to/php/interpreter as the first line above the part of the code that starts <?php
2. change cron so it runs the commands as /path/to/php /php/script/to/run
Ask your host what the full path is to php on the file system.
oziman
It seems to be running fine now. Though my cron update program is acheving the task desired, I still get this message:
<br />
<b>Notice</b>: Undefined index: DOCUMENT_ROOT in <b>/home/ACCOUNTNAME/public_html/includes/api.feedsprocessing.php</b> on line <b>193</b><br />
<pre>
I do not know if this is going to bother me, but does this mean anything?
Thanks
cron uses commands as you would use them from the command line
go to the command line and find the command/path to run your script. When you get the paths right then that is what you use for your cron