First page Back Continue Last page Graphics
Trigger for Hourly Rollover
- Maintaining these jsdata files requires script detection of when an hourly, daily, or monthly rollover occurs
- ScanEngine Explorer Script
- Add variables for today’s date, hour, month, and day
- New Variable today init Left(timestamp,8)
- New Variable hour init 99
- New Variable month init Left(today,2)
- New Variable day init Mid(today,3,2)-1
- After counting booster pump activations, decide if an hourly rollover occurred
- If hour != Mid(timestamp,9,2)
- If hour != 99
- >Assign LogFilename = today_hourly_js
- Textlog "hourly[" + hour + "]=\"" + hourly_booster_count + "\";"
- EndIf
- Assign hourly_booster_count = 0
- Assign hour = Mid(timestamp,9,2)
- EndIf
- timestamp returns fixed system time/date format
- mm/dd/yy hh:mm:ss
- Every hourly rollover, append new line to daily jsdata file, clear the hourly count, and refresh the hour variable