bpsmicro wrote:I've been playing with this a bit, so that i could play with the JpGraph stuff. But I'm having a heck of a time finding a suitable mechanism to run .php scripts every minute on a Win2003 server that doesn't involve running what's essentially a DOS program (PHP) in an endless loop and praying that it doesn't negatively effect the server (which is a domain server).
As for the scripts for starters, the current scripts only look for info at a max of every 15 minutes. I use the one minute increment for several purposes, 1) to a make sure I get each of the 15 minute markers 2) I use the data for more than just graphs.
So you could do it every 15 minutes and change the graph code to use every entry it sees rather than looking for specific timestamps (the time might wander).
I am NOT a windows guy, more of a Unix guy and under unix, this is very easy to do with cron. But I do some timed things on my weather workstation which is a WinXP box and it's scheduler is certaintly capable of using once a minute
Just for my own education what's missing in the existing realtime.txt file that the JpGraph stuff can't use (that requires essentially one text file to be parsed into a second text file every minute)?
Is there a prayer this whole "realtime.log" thing could be added in the actual Cumulus program at some point, thus eliminating the need for this script entirely?
The problem there is that you then have to upload an ever increasing data file to your webserver for data that has technically already been sent there. Attempting to use FTP append really depends on whether the FTP server supports it and if you have an FTP client that does as well and my experience has been that is not a dependable method of doing that type of function.
On the web server, you don't have to use the PHP script to do this, you could use Perl, KSH, Bash etc to do the same thing, I've just provided a PHP method. But again, this is an easy thing to do under a Unix based web platform. My original script was written in Perl since I already do this type of function for many other purposes in Perl.