How to assign time interval to take regular cache using geowebche. For instance every afternoon at 13:00 hrs geowebcache should be started automatically and it should start creating tiles. ?


This is a complete working method to seed tiles automatically with GeoWebCache:

1) Go to http://curl.haxx.se/dlwiz/, select your Operating System, and then download and install the cURL utility.

2) Then, with the help of cURL you can initiate a seeding task:

curl -v -u USERNAME:PASSWORD -XPOST -H "Content-type: text/xml" -d "<seedRequest><name>WORKSPACE:LAYER</name><srs><number>4326</number></srs><zoomStart>1</zoomStart><zoomStop>12</zoomStop><format>image/png</format><type>truncate</type><threadCount>2</threadCount></seedRequest>" ""

enter image description here\

  • Notice 1: Pay attention to the text capitalisation, especially when you use a workspace with uppercase letters, like mine; otherwise you'll obtain an error.

  • Notice 2: In Windows, you'll obtain an other error if you will try to run the example showed in GeoWebCache REST API Seeding and Truncating (In Windows, you must use only double quotes in the curl command).

  • Notice 3: Don't use breaks in the curl command if you are not looking for troubles.

  • Notice 4: Between the type tags you can use the seed / reseed or truncate methods.

3) In Windows, all you have to do, is to schedule a new task for the seeding process:

enter image description here

enter image description here

enter image description here

enter image description here

4) And here's your tiles:

enter image description here

| improve this answer | |
  • where the xml file will be saved and how to add that in task ? – Vikram Feb 28 '14 at 7:52
  • You don't need to create or save the xml file. The cURL utility will generate a seed/reseed/truncate task request in xml format, which will be automatically sent to the GeoServer. – Sorin Călinică Feb 28 '14 at 8:05
  • So I should point the windows task scheduler to curl.exe ? Am I right ? – Vikram Feb 28 '14 at 8:12
  • I've updated my response. – Sorin Călinică Feb 28 '14 at 8:16
  • Călinicăis there any way to use bounding box option in curl tool? – Vikram Jun 19 '14 at 10:40

You could try setting up a cron job if you are running on a Linux system.

| improve this answer | |
  • I am using windows !! – Vikram Feb 26 '14 at 7:47
  • 2
    @Vikram: so that sort of information might have been useful to include in the question. Please consider that for next time. – BradHards Feb 28 '14 at 8:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.