Adrian Hudson wrote: ↑Sun 05 Jul 2020 6:09 pm
someone might be caught out by it one day.
I am sure, many other people, like me,
have been caught out by it several times.
If I was skilled enough, I would rewrite several parts of MX to make a product that worked sensibly, but I failed when I tried to rewrite just 3 pages of the admin interface where Mark actually said when they were first released that someone needed to improve them. Mind you, it was not just my incompetence, a lot of the reason for my struggle was that MX uses such obsolete versions of library software, a lot of functionality in current documentation was denied to me.
Another suggestion made many times in old days was that Cumulus should log the maximum and minimum since the last log line update each time it writes another line to the standard log file. By almost doubling the items written (quite a few don't get lowest derived, e.g. rain, wind, heat index) you can easily recalculate daily, monthly, annual or all-time figures without missing the actual extreme. Currently, you only log a small sample of all the measurements that Cumulus processes and the chance of extremes being logged is tiny. I don't have enough fingers and toes to count how often that was raised, it was considered for Cumulus 2 (although that never had all intended functionality), and so I expected it to arrive with MX, but no for compatibility with Cumulus 1, the chance of improving design when MX came out was missed.
Adrian Hudson wrote: ↑Sun 05 Jul 2020 6:09 pm
It would be *really* nice if there were a <currentdatetime> so that the file could be put in the correct folder to,o but hey
I suspect the problem is that end of day uses several threads and the date-time from that dealing with the backup, could not be easily made available to that dealing with the extra web files processing, but Mark knows his code better than I do to answer your question.
But, Adrian,
my end of day PHP script (initiated by Cumulus in that EOD program option) does work out the folder name too. But it can't amend the extra web files action and it needs to wait for Cumulus to finish doing its writing of the files to the back-up folder, so in my script I include a delay of 35 seconds so this access to the folder happens when it definitely will exist and will not be locked.
$cumulus is the folder above the backup. This script worked with Cumulus 1 for almost a decade, and carried over to MX when I swapped last April.
Code: Select all
$directoriesFound = 0;
$pathName = $cumulus . "/backup/daily/";
$directoryName = $today_ini_date . $rollOver . "*/";
foreach(glob($pathName . $directoryName) as $testName)
{
$newPathName[$directoriesFound] = $testName;
$directoriesFound++;
}
That can sometimes find 2 directories (hence putting folder into array), but generally finds one which is the backup folder, which script can then use! My script puts out a message that manual action is needed if 2 found!
It is perhaps worth adding that when I learnt PHP in my retirement I wanted to test every feature, so I was so glad when I found "glob" was very useful!