A Publish script can be scheduled to run at set times using the scheduler.
Scheduled publish events are configured in an XML file which must be located in a certain location. For a specific project, this location is:
Here is a simple example of configuration file:
<schedule> <event> <start datetime="2010-07-15T07:00:00+10:00" /> <repeat minutes="4" until="2010-07-15T10:00:00+10:00" /> <target name="create-comment"> <description>Create Comments</description> <param name="folder-name" value="tutorials" /> <param name="max-size" value="10" /> </target> </event> <event> <start datetime="2010-07-14T00:00:00+10:00" /> <repeat days="1" until="2010-08-14T00:00:00+10:00" /> <target name="generate-summary" > <description>Produce Daily Summary</description> </target> </event> </schedule>
In the example above, two events are added to the scheduler. When these events are run, the project corresponding to the configuration file is published. That is to say, there is no document being published, only the group parameters are sent to the Ant script (see PageSeeder's Publish parameters for more information).
A publish event must have a name, a start datetime, a target name and description. Optional fields of the events are: a repeat frequency and a list of params.
Repeat frequency is defined by a repeat interval unit (three are allowed: minutes, hours and days) and the value of the interval. An optional attribute is the end datetime for the repeat field. Here are examples of repeat frequencies:
<repeat days="7" /> <repeat hours="24" until="2010-12-31T00:00:00+10:00" /> <repeat minutes="15" />
Params are the parameters sent to the Ant script, there could be as many as needed.
The corresponding ANT script must be on the ps-publisher in the location below and contain targets with the names specified in the
A jsession ID will not be available to the publish script so it will need a username and password to access PageSeeder. These can be supplied using the
<ps:config> task as follows:
<ps:config file="pageseeder.properties" />
with the following file
pageseeder.properties in the same folder as the
Testing and pausing scripts
After configuring the script go to the Console page located under the Admin tab and click the refresh icon next to Publishing - Scheduled jobs. The scheduled scripts should then be listed and you can choose Run now to test or Pause/Continue if required. To see the logs for these View the publish logs.
Created on , last edited on