Hi Everybody,
I went through all the postings on this same subject since I face the same problem to help my friend to set up an e-card site. I want to run a php script periodically and the php installed in the server as Modules. The first and foremost problem was as it was not an executable or cgi program - you have to run it through web server only.
at last we created a crontab file say 'crontext.txt' and stored it any place on the server and give it 755 permission.
The content of the file is something like:
- * /the full path to lynx -dump http:// url of program file >/dev/null
(all in a single line).
The full path to lynx means the path from the root to the lynx executable.
For example: /usr/local/bin/lynx (this you have to see by typing 'which lynx' in unix prompt)
the four s mean the cron will wake up every minute and ask the web server lynx to execute the php program file and dump it in /dev/null. You can change the option of the duration of execution of the program by changing the 4 s(for that you have to know the crontab in detail).
now after saving it in somewhere in your server and giving the .txt file a 755 permission just type on the unix promt:
crontab /the path of the text file
for example:
crontab /usr/local/www/crontext.txt
I tested it both on FreeBSD and Linux and in both cases it worked.