This script used to work just fine, but is throwing errors every night since 10/16/2019 at the exact time its running 23:59:57.
/*
//Script by Phil Dunlap to automatically generate lost history
if( my.time + 60000 < source.time ) { //We're at least a minute after
var metaEditDwr = new com.serotonin.m2m2.meta.MetaEditDwr();
metaEditDwr.generateMetaPointHistory(
my.getDataPointWrapper().getId(), my.time+1, CONTEXT.getRuntime(), false);
//Arguments are, dataPointId, long from, long to, boolean deleteExistingData
//my.time+1 because first argument is inclusive, and we have value there
}
//Your regular script here.*/
return CwConsumed.value-CwConsumed.ago(DAY, 1) //Subtracts this moment's gallons used minus one day ago
Here's the error:
'MetaDataSource': Script error in point "Main Historian - DHW Consumed Daily Count": Expected } but found eof return DhwConsumed.value-DhwConsumed.ago(DAY, 1) //Subtracts this moment's gallons used minus one day ago ^ at line: 12, column: 129Add comment