Hi
Is there any problem in running the SARATOGA WEATHER ajax-dashboard.php program as a solo CRON job on my web server? I have included in this program code to extract various timely (5 min) data and so update a MySQL database. I need to update that database in a timely manner (say 5 min intervals). At the moment it updates the database whenever someone logs on to my website as doing just that causes the ajax-dashboard.php to run.
One obvious solution would be to update the database by using another program outside the ajax.........php however, as yet, I haven't worked out how to input the 5 min data into a program in useable form.
Any suggestions please?
Keith Griffin
I use cron for a similar reason, index.php runs on set intervals using cron.
I attached the script, it is set to run the index.php startpage.
The ob_start and ob_clean functions suppress all output.
So make a testrun first with
http://www.kstwx.net/example_cron.php?debugAll output will be shown normally and you can check if all is OK.
Set the cron to run without ?debug.
===
Some minor "problems":
- your visitor counters will be affected with all those cronjobs, you can use the $cron_job variable to test in your scripts if the visitor should be counted
- your 5 minutes database-load interval will be affected by the normal visitors as long as you do not check that also in the scripts
Success, Wim