Hey Terry,
This one is also giving a java out of bounds exception, but I don't understand why:
/*
//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.*/
//Get daily run starts
return runs.past(MINUTE, 1440)['data'].get(true).starts;