[mapserver-users] Automatically Clearing Old Map Images

jchampagne2 valiantheart at hotmail.com
Tue Apr 28 10:15:48 PDT 2009


Thank you! I did a little research, and writing a .bat file to execute as a
scheduled task
is exactly what I needed. The file is simple:

@echo off
cd C:\OSGeo4W\tmp\ms_tmp
del *.png
cls
echo Your MapServer cache has been cleared!
echo.
pause >nul

Saved as 'clearCache.bat' and added it as a scheduled task through Windows
System Tools. I added the message just for diagnostic purposes, but I'll
probably delete it once I'm sure this will work. 


Gregor at HostGIS wrote:
> 
> 
> Yeah, typical cronjob approaches. I can't say for Windows, but for Linux 
> systems you'd create a /etc/cron.hourly file that goes something like 
> one of these, depending on your version of "find":
> 
> find /maps/images.tmp -mindepth 1 -ctime +1 -exec rm -f {} \;
> 
> find /maps/images.tmp -mindepth 1 -ctime +1 -delete
> 
> 

-- 
View this message in context: http://n2.nabble.com/Automatically-Clearing-Old-Map-Images-tp2699631p2734870.html
Sent from the Mapserver - User mailing list archive at Nabble.com.




More information about the MapServer-users mailing list