Re: [mapserver-users] Automatically Clearing Old Map Images
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. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Automatically Clearing Old Map Images
jchampagne2 wrote: Thank you! I did a little research, and writing a .bat file to execute as a scheduled task is exactly what I needed Cool. del *.png Just for future planning, you may want to add *.jpg and *.gif to it. Otherwise, three years from now when you're also generating JPEGs you'll wonder why your disk has filled up. -- HostGIS, Open Source solutions for the global GIS community Greg Allensworth - SysAdmin, Programmer, GIS Person, Security Network+ Server+ A+ Security+ ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Automatically Clearing Old Map Images
I'm attempting to set up a web page based on the old 'Itasca' demo, but I will probably be hosting it with very limited web space. Has anybody come up with some means or method to automatically clear out old map images once they are no longer needed? In just a couple of days of testing the application, I managed to generate over 1500 maps for a total of about 10Mb. Help! -- View this message in context: http://n2.nabble.com/Automatically-Clearing-Old-Map-Images-tp2699631p2699631.html Sent from the Mapserver - User mailing list archive at Nabble.com. ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users