Let me explain why I make that assertion.
As part of End of Day, MX creates a sub-folder in CumulusMX/backup/daily.
Historically (in legacy Cumulus and MX), that folder has been named using a format that can be described by yyyyMMddHHmmss.
For me with a 10 am rollover in summer, the HH would be 10, and the minutes and seconds would be zero, providing Cumulus is left running. For over a decade I have had a script that reads the today.ini in that folder to extract information about rainfall and to derive the daily increment in Chill Hours (as the software does not report that). This has successfully for all those past years easily found the folder.
Last month, I had to modify the script as I upgraded my MX then (having previously been happy to stay with an old release. Now sometimes the backup folder is named (and created) ten minutes later. So my code still looks for zero minutes folder, but if that fails, it now looks for a folder timed 10 minutes later. I don't see any evidence of any other names, and it might be related to that my Cumulus logging interval is set to 10 minutes, as nothing else is set to 10 minutes.
In the MX code:
I find from line 6367 in Cumulus.cs within the function private void Backupdata(bool daily, DateTime timestamp) says
Code: Select all
string foldername = timestamp.ToString("yyyyMMddHHmmss");
Lines 5968 to 5972 triggers that function at what it calls there "StartofDay" (apparently this can be ten minutes later, than the "day rest" procedure, sometimes). To me it seems strange that the back-up call is not coded so it always at time of completing day reset!
I am assuming, that MX constantly works through the code in this area, and can only guess something somewhere else in that code section is responsible for the ten minute delay sometimes, but not other times? That is why I asserted above that maybe the code is not correctly written?
This delay happened this morning, after a run of mornings with zero minutes, so I compared the relevant parts of the two log files (a rotation happened between them) in MXdiags folder, and there is nothing to explain this, even when I look at every single line (just key lines shown below for yesterday and today):
First of all yesterday (when "startOfDay" followed "Day rest"):
So yesterday there was apparently a problem with today.ini (but nothing to explain why), but it still created backup folder with zero minutes name2021-04-09 10:00:09.705 === Day reset, today = 9
2021-04-09 10:00:09.705 === Day reset for 08/04/2021 00:00:00
2021-04-09 10:00:09.706 Dayfile.txt entry:
2021-04-09 10:00:09.706 08/04/21,33.86,225,18:44,4.6,07:37,11.5,11:33,997.2,05:11,1006.3,10:23,3.6,07:07,1.8,8.4,230.3,25.3,18:04,48,13:27,83,08:11,0.00,0.00,11.5,11:33,7.1,12:21,0.1,01:39,0.9,07:07,2.3,06:38,3.3,04:46,-1.3,19:44,239,7.1,0.0,0,10:00,0.0,10:00,9.5,12:21,2.3,06:38,9.9,14:29
2021-04-09 10:00:09.707 Dayfile.txt opened for writing
2021-04-09 10:00:09.707 Writing entry to dayfile.txt
2021-04-09 10:00:09.707 Raincounter = 359.4 Raindaystart = 357.6
...
2021-04-09 10:03:04.950 Executing daily program: sh params: "./batch/autoEOD.sh"
2021-04-09 10:03:04.979 === Day reset complete
2021-04-09 10:03:04.979 Now recording data for day=9 month=4 year=2021
2021-04-09 10:03:04.985 DoLogFile: Writing log entry for 09/04/2021 10:00:00
2021-04-09 10:03:04.987 DoLogFile: Written log entry for 09/04/2021 10:00:00
2021-04-09 10:03:04.990 Writing today.ini, LastUpdateTime = 09/04/2021 10:00:00 raindaystart = 359.4 rain counter = 359.4
2021-04-09 10:03:04.990 Latest reading: 58D0: 08-31-AA-00-52-3E-00-E8-26-07-0A-00-08-AE-04-00
2021-04-09 10:03:10.446 Error writing today.ini: Sharing violation on path /media/pi/mx/CumulusMX/data/today.ini
2021-04-09 10:03:10.467 Creating backup folder backup/daily/20210409100000/
Now compare with today (when there was an unexplained ten minute delay):
So today, no messages about any problems, but it creates backup folder 10 minutes after it finishes the day reset.2021-04-10 10:00:03.849 === Day reset, today = 10
2021-04-10 10:00:07.598 Realtime[128]: Start cycle
2021-04-10 10:00:08.857 Reading first block
2021-04-10 10:00:09.301 === Day reset for 09/04/2021 00:00:00
2021-04-10 10:00:09.305 Dayfile.txt entry:
2021-04-10 10:00:09.305 09/04/21,16.03,45,16:03,0.7,06:57,10.3,13:06,998.7,13:14,1001.9,09:10,3.6,14:21,0.6,4.5,55.9,13.1,16:03,53,13:10,82,10:00,0.00,0.00,10.3,13:06,8.0,12:59,-2.8,06:58,0.6,14:42,-1.0,04:02,4.4,10:28,-4.5,05:17,343,11.0,0.0,0,10:00,0.0,10:00,10.0,12:58,-1.0,04:02,9.9,12:49
2021-04-10 10:00:09.306 Dayfile.txt opened for writing
2021-04-10 10:00:09.306 Writing entry to dayfile.txt
2021-04-10 10:00:09.307 Raincounter = 360 Raindaystart = 359.4
...
2021-04-10 10:01:15.890 Executing daily program: sh params: "./batch/autoEOD.sh"
2021-04-10 10:01:15.898 === Day reset complete
2021-04-10 10:01:15.899 Now recording data for day=10 month=4 year=2021
2021-04-10 10:01:23.059 Reading first block
...
2021-04-10 10:10:12.552 DoLogFile: Written log entry for 10/04/2021 10:10:00
2021-04-10 10:10:12.560 Writing today.ini, LastUpdateTime = 10/04/2021 10:10:00 raindaystart = 360 rain counter = 360
2021-04-10 10:10:12.561 Latest reading: 61E0: 04-32-A7-00-44-1A-00-05-27-00-00-00-04-B0-04-00
2021-04-10 10:10:12.571 Creating backup folder backup/daily/20210410101000/