paulbates Posted March 5 Share Posted March 5 I have a program that resets values for reporting at the end of month day 1, so I can evaluate highs and lows in future days. The last few lines curiously don't seem to work. However, after 2 months of testing, its clear the last few lines aren't executing. I'm thinking its taking longer than the 5 seconds I gave it, the day value changes and program dies before completing: Assumption: that the variable assignments and inits don't take very long. Sump Pump Monthly Values Reset PM - [ID 0047][Parent 001A] If 'TimeData' Day of Month is 1 days And Time is 11:59:55PM Then $Sump_Pump_Maximum_daily_Gallons = $Sump_Pump_Gallons_Daily $Sump_Pump_Maximum_daily_Gallons Init To $Sump_Pump_Maximum_daily_Gallons $Sump_Pump_Minimum_daily_gallons = $Sump_Pump_Gallons_Daily $Sump_Pump_Minimum_daily_gallons Init To $Sump_Pump_Minimum_daily_gallons $Sump_Pump_Minimum_daily_cycles = $Sump_Pump_Cycles $Sump_Pump_Minimum_daily_cycles Init To $Sump_Pump_Minimum_daily_cycles $Sump_Pump_Maximum_daily_cycles = $Sump_Pump_Cycles $Sump_Pump_Maximum_daily_cycles Init To $Sump_Pump_Maximum_daily_cycles $Sump_Pump_Monthly_Gallons = $Sump_Pump_Gallons_Daily $Sump_Pump_Monthly_Gallons Init To $Sump_Pump_Monthly_Gallons Else - No Actions - (To add one, press 'Action') I just updated it to 11:59:45 and will look next month The question, approximately how long should assign or init take? Paul Link to comment
gzahar Posted March 5 Share Posted March 5 (edited) 1 hour ago, paulbates said: $Sump_Pump_Monthly_Gallons = $Sump_Pump_Gallons_Daily This looks suspicious. Agreed you may be changing the day and rerunning before it completes. Do the values change right at midnight so that if it reruns, you would get the wrong results the second pass? Nevermind, if the days changes it would not run again right away. Edited March 5 by gzahar Link to comment
Recommended Posts