First page Back Continue Last page Graphics
Trigger for Daily Rollover
- It may be observed from the earlier usage charts, that the script is maintaining CURRENT monthly and daily data, along with the prior 3 days & months
- Every daily rollover, need to close today’s daily jsdata file and rename older files
- ScanEngine Explorer Script
- After performing hourly rollover, decide if a daily rollover occurred
- If today != Left(timestamp,8)
- Delete Textlog three_days_old_hourly_js
- Rename Textlog two_days_old_hourly_js , three_days_old_hourly_js
- Rename Textlog yesterday_hourly_js , two_days_old_hourly_js
- Rename Textlog today_hourly_js , yesterday_hourly_js
- >Assign LogFilename = today_hourly_js
- Textlog "var hourly=new Array(24);"
- Textlog "var datestring=\"" + Left(timestamp,8) + "\";"
- Textlog "hourly=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];"
- Assign today = Left(timestamp,8)
-
- >Assign LogFilename = this_month_daily_js
- Textlog "daily[" + day + "]=" + daily_booster_count + ";"
- Assign day = Mid(timestamp,3,2)-1
- Assign daily_booster_count = 0
- (continue to monthly rollover detection)
- EndIf
- Delete the oldest day jsdata file
- Rename (age) the other jsdata files by one day
- Create a brand new (and empty) jsdata file for the new day
- Every daily rollover, append new line to monthly jsdata file, clear the daily count, and refresh the day variable