Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Applicable Releases:
Description:
In this video we will be going over how to clear Windchill PDMLink caches and temporary files created for Tomcat, Info*Engine, Java, Workflow Expressions and Browser cache.
I would advice to create CMD batch to automate an operation to cleaning cache during restart Method server.
echo off
rem set variable for Windchill root example: D:\Windchill_10.1
SET wt.root=C:\Windchill_12.0
rem ----------------------------------------------------------
rem set wt.home variable
SET wt.home=%wt.root%\Windchill
rem set wt.backup varoable for logs
SET wt.backup=%wt.root%\windchill_logs
rem nastaveni nazvu sluzeb
SET windchill.service="Windchill"
if EXIST %wt.root% (
net start | find %windchill.service%
if ERRORLEVEL 1 (
echo Sluzba %windchill.service% neexistuje - ZKOTROLUJTE promenou windchill.service
pause
goto END
)
goto CONTINOUE
) ELSE echo ---------------------------------------
echo Slozka Windchill root neexistuje
echo wt.root neni spravne definovana
echo %wt.root%
echo ---------------------------------------
pause
goto END
:CONTINOUE
echo Kontrola OK.
echo on
call %wt.home%\bin\windchill.exe --java="%wt.root%\Java\bin\java.exe" stop
net stop %windchill.service%
rd "%wt.home%\tomcat\instances" /S /Q
mkdir "%wt.home%\tomcat\instances"
rd "%wt.home%\temp" /S /Q
mkdir "%wt.home%\temp"
rd "%wt.home%\tasks\codebase\com" /S /Q
mkdir "%wt.backup%"
move /Y %wt.home%\logs\*.log %wt.backup%
move /Y %wt.home%\logs\*.log.* %wt.backup%
rem move /Y %wt.root%\HTTPServer\logs\access.log %wt.backup%
net start %windchill.service%
pause