# =============================================================================== # SET THE VARIABLES BELOW - REQUIRED SO ALL SCRIPTS RUN CORRECTLY AND OUTPUT TO # SAME DIRECTORY. YOU CAN USE BASH IN CRONTAB TO RUN PURGES ON LOGS AND REPORTS. # OWNER, BRANT PUTTKAMMER, LAST UPDATED 01/31/2015 ## PROPERTY OF BRANT PUTTKAMMER, PLEASE CONTACT ME IF YOU HAVE QUESTIONS ## PLEASE USE CAUTION WHEN RUNNING THIS PROGRAM ON YOUR SYSTEM # =============================================================================== set DefaultLiveAccountPath "[YOUR_LIVE_ACCOUNT_DIRECTORY_PATH]" set DefaultTestAccountPath "[YOUR_TEST_ACCOUNT_DIRECTORY_PATH]" set DefaultReportFilesPath "_HOLD_" set DirectoryExpectLogs "/udadmin/expectlogs" set DirectoryExpectLogsArchive "/udadmin/expectlogs/archive" set DirectoryExpectScripts "/udadmin/expectscripts" set DirectoryExpectFiles "/udadmin/expectfiles" set DirectoryExpectPDFReports "/udadmin/expectfiles/convert" set DirectoryExpectPDFReportsArchive "/udadmin/expectfiles/tmp" set KasasaValidationReport "$DefaultLiveAccountPath/$DefaultReportFilesPath/1_KASASA-VALIDATION-REPORT-EOC_$CurrentMonth$CurrentDayFull" set TextString "FALSE" set TextString2 "FALSE" set TextString3 "FALSE" set TextString4 "FALSE" set CalendarString "FALSE" set ScriptName "UNKNOWN-SCRIPT" set EmailNotes "" set EmailSubject "UNKNOWN" set ScriptDescription "...none available..." # ******************************************************************************* # ADD NEW MonthEndDates, YOU MUST FORMAT DATE AS MMDDYY INCLUDING ZERO VALUES # JUNE 1 2007, WOULD BE 060107 # SCRIPTS THAT USE MonthEndDates - ENTER IN NEW MonthEndDates IF END OF MONTH IS A HOLIDAY OR NONBUSINESS DAY # SCRIPTS THAT USE AbsMonthEndDates - NO LONGER NEEDED FOR START/FINISH 7 DAYS A WEEK set MonthEndDates {022912 033012 043012 053112 062912 073112 083112 092812 103112 113012 123112 013113 123016} set AbsMonthEndDates {022912 033112 043012 053112 063012 073112 083112 093012 103112 113012 123112 013113 123116 123017 123117 123122} # ******************************************************************************* # SAVEVG DATES ARE SET SO SAVEVG CAN RUN IN THE MIDDLE OF THE NIGHT - USED IN eop_tapes.exp # SET DATES BACK FROM SERVER REBOOT - SERVER REBOOT USUALLY HAPPENS NIGHT BEFORE ME/QE set SavevgDatesEOM {012512 022412 032812 042512 052912 062612} set SavevgDatesData {012612 022812 032912 042612 053012 062812} # ******************************************************************************* # STARTAbsMonthEndDateInt and STARTMonthEndDates MUST MATCH THE INDEX OF ONE ANOTHER - 062912 EQUALS 1 # 1 IS THE NUMBER OF DAYS IN THE FUTURE FROM THE CURRENT DATE, SO THAT THE ACTION DATE IS ADJUSTED CORRECTLY # ONLY INCLUDE STARTMonthEndDates WHEN THE MONTH END DATE IS NOT EQUAL TO THE ABSOLUTE LAST DAY OF THE MONTH # SCRIPTS THAT USE STARTMonthEndDates - start.exp - 032913 062813, 2 2 set STARTMonthEndDates {042911 072911 123011 033012 062912 092812 123016} set STARTAbsMonthEndDateInt {1 2 1 1 1 2 1} # ******************************************************************************* # SPECIFY HolidayDates IF YOU WANT SCRIPTS TO SKIP BECAUSE THE DATE IS A HOLIDAY # SCRIPTS THAT USE HolidayDates - GENERALLY ALL SCRIPTS EXCEPT A FEW LIKE every-day-14.exp set HolidayDates {052812 070412 090312 100812 111212 112212 122512 010113 012113 021813 123116 123017 123117 123122} # BUSINESS DAY BEFORE MONTH END IS RUN # SCRIPTS THAT USE PreMonthEndDates - overnight_me.exp set PreMonthEndDates {122812 013013 022713 032813 042913 053013 062713 122916} # ******************************************************************************* # MISC. DATE VARIABLES USED IN VARIETY OF SCRIPTS # DATE STRING THAT WILL DETERMINE WHETHER TO RUN OR SKIP SCRIPT - ANY DATES # MATCHING A DATE BELOW WILL BE SKIP SCRIPT - CAN BE USED FOR RUNNING EOY PROGRAMS set SkipCalendarDates {123111 123116 123017 123117 123122} # ******************************************************************************* # SET DAY VARIABLE YOU WANT PURGES TO RUN ON - SET TO FRIDAY # WEEKDAY NUMBER 1-7, STARTS ON MONDAY ENDS ON SUNDAY set PurgeVariableDay 5 set PurgeInfoFileName "$DirectoryExpectLogs/PurgeSummary.txt" if {$CurrentDayTrim > 21} {set CU596TailLimit 29} else {set CU596TailLimit 38} # ******************************************************************************* # CU598 PURGE PROGRAM VARIABLES - IF DATE IS LESS THAN 15 RUN IN TEST MODE set RunPurgePrograms "FALSE" if {$CurrentDayTrim < 15} { set TestRunAnswer "Y" set TestModeAnswer "R" set TestRunEmailText "\nThe purge program was run in TEST MODE. Files will be purged next time this program is run after the 14th.\n" } else { set TestRunAnswer "N" set TestModeAnswer "P" set TestRunEmailText "\nThe purge program was run in LIVE MODE. Files were purged.\n" } # TEST TO SEE IF WE SHOULD RUN PURGES if {($CurrentMonth == "02")} { if {($CurrentDate == $SecondLastDayOfMonthNumeric && $CurrentDateTomorrowFull == $LastDayOfMonthNumeric && $CurrentDayOfWeek == [expr ($PurgeVariableDay - 1)])} { set RunPurgePrograms "TRUE" } elseif {($CurrentDayOfWeek == $PurgeVariableDay && $CurrentDayTrim > 14 && $CurrentDayTrim < 22)} { set RunPurgePrograms "TRUE" } elseif {($CurrentDayOfWeek == $PurgeVariableDay && $CurrentDayTrim > 21 && $CurrentDayTrim < 29 && $CurrentDate != $LastDayOfMonthNumeric) || $CurrentDayTrim == 40} { set RunPurgePrograms "TRUE" } else { } } elseif {($CurrentDayOfWeek == $PurgeVariableDay && $CurrentDayTrim > 0 && $CurrentDayTrim < 8)} { set RunPurgePrograms "TRUE" } elseif {($CurrentDayOfWeek == $PurgeVariableDay && $CurrentDayTrim > 14 && $CurrentDayTrim < 22)} { set RunPurgePrograms "TRUE" } elseif {($CurrentDayOfWeek == $PurgeVariableDay && $CurrentDayTrim > 21 && $CurrentDayTrim < 29) || $CurrentDayTrim == 40} { set RunPurgePrograms "TRUE" } else { } # *******************************************************************************