Category:Cumulus MX: Difference between revisions

m
 
= MX End of Day Process =
 
I have added this section, because this process has given me some headaches. If you write custom SQL, or have a template being processed at end of day, then what I find strange is that web tags related to system date report the new date, but other web tags report weather derivatives from the old day. Put another way, the date changes at start of rollover, but the weather web tags change at end of rollover. However, it is not quite as simple as that, the month and year are reset after any Custom SQL is run (so that SQL can use monthly and yearly web tags related to previous day), but before the extra files are processed (so they cannot use monthly web tags at end of month, nor yearly web tags at end of year). See why I found it hard to digest, and why I wanted to write it here to make it easier for others.
I have added this section, because this process has given me some headaches.
== My version ==
 
If you write custom SQL, or have a template being processed at end of day, then what I find strange is that web tags related to system date report the new date, but other web tags report weather derivatives from the old day. Put another way, all the date related tags change at start of rollover, but all the weather related web tags change at end of rollover.
 
However, it is not quite as simple as that, the month and year are reset before the extra web files are processed (so they cannot use monthly web tags at end of month, nor yearly web tags at end of year). The complication is that in the extra web files you can use '''<currentlogfile>''' (and from build 3087 '''<currentextralogfile>''') and these pick up the old month/year. Now you see why I found it hard to digest, and why I wanted to write it here to make it easier for others.
 
If you use Custom SQL and therefore have to quote web tags, the SQL should use monthly and yearly web tags related to previous day, but all the weather tags it uses must be those for current conditions or today. Yes it is confusing.
 
As part of the so called "end of day" process, MX (just like Cumulus 1) creates a start of day back up in the daily sub-folder. So on first day of a new month (and new year sometimes), the backed standard log files (and extra sensor log files from build 3087) are for the month that has just started, there is no back-up of the old month.
 
== The official version ==
 
Mark Crossley says the MX day reset does this...
5,838

edits