[opencms-dev] scheduler job

Georg Aigner aigner.georg.79 at gmail.com
Sat Jan 24 16:41:42 CET 2015


Hi all

I am new to openCMS (9.5.0) an i have to clear the CRM History via a job or
via jsp trigger.
So i created the CmsHistoryClearJob.

The job is doing as expected the cleanup, but he is starting from root and
clears all.

       <job>
                <name>MyJob</name>
                <class>org.opencms.scheduler.jobs.CmsHistoryClearJob</class>
                <reuseinstance>false</reuseinstance>
                <active>true</active>
                <cronexpression><![CDATA[0 0 3 * * ?]]></cronexpression>
                <context>
                    <user>Admin</user>
                    <project>projectA</project>
                    <siteroot>/</siteroot>
                    <requesteduri>/project-a/</requesteduri>
                    <locale>en</locale>
                    <encoding>UTF-8</encoding>
                    <remoteaddr>127.0.0.1</remoteaddr>
                </context>
                <parameters>
                    <param name="clearDeleted">true</param>
                    <param name="keepTimeRange">0</param>
                    <param name="keepVersions">0</param>
                </parameters>
            </job>

But i only like to clean the history below the project "projectA" which is
mapped to a folder at /sites/default/project-a

but the settings in the job are ignored or i do not understand the correct
usage of them.

So is it possible to clean the history starting from a provided folder or
project?

thx
georg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20150124/a49ff5a1/attachment.htm>


More information about the opencms-dev mailing list