Ok, it's time to do some maintenance and performance tuning on your Tridion CMS. One of the things you should keep an eye is the size of the Publishing Queue. This can grow quite large over time depending on the amount of publishing going on daily. Tridion comes with a very handy tool -- the Purge Tool, which allows trimming the size of the Publishing Queue. I won't go into what the tool can do; there is documentation for that. The following little script is perfect to run inside a Windows batch script and schedule it to execute periodically. In its current state it deletes Publish Transactions that completed more than 1 year ago relative to today's date. @echo off set /a LastYear=%DATE:~10,4%-1 set OneYearAgo=%LastYear%/%date:~4,5% echo OneYearAgo=%OneYearAgo% echo TRIDION_HOME=%TRIDION_HOME% @echo off > "%TRIDION_HOME%bin\purge.xml" & setLocal enableDELAYedexpansion for /f "tokens=* delims= " %%a in (purgeTemplate.xml) do (...
talk is cheap. show me the code.