First page Back Continue Last page Graphics
Trigger for Monthly Rollover
- The daily rollover continues with testing for monthly rollover
- ScanEngine Explorer Script
- After performing daily rollover, decide if a monthly rollover occurred
- If today != Left(timestamp,8)
- (continued from daily rollover)
- If month != Left(timestamp,2)
- Delete Textlog three_months_old_daily_js
- Rename Textlog two_months_old_daily_js , three_months_old_daily_js
- Rename Textlog last_month_daily_js , two_months_old_daily_js
- Rename Textlog this_month_daily_js , last_month_daily_js
- Assign month = Left(timestamp,2)
- >Assign LogFilename = this_month_daily_js
- Textlog "var daily=new Array(31);"
- Textlog "var monthstring=\"" + monthstring + "\";“
- Textlog "var daysinmonth=" + daysinmonth + ";“
- Textlog "daily=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];“
- EndIf
- EndIf
- Delete the oldest month jsdata file
- Rename (age) the other jsdata files by one month
- Create a brand new (and empty) jsdata file for the new month
- Programatically calculating daysinmonth and monthstring is not shown as neither interesting, instructive, nor challenging