Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

How to change Revision Clean Up default running time on CQ6.1

Avatar

Level 4

Hi Guys,

I have a question, I know the new implemention of garbage collection that is Revision Clean Up on daily maintenance.

But how to set up the running time becuase of the default time is 2:00-5:00? I would like to change it to run on other time.

Thanks.

1 Accepted Solution

Avatar

Correct answer by
Level 3

Hi

I don't know about AEM 6.1 but with AEM 6.0 you could create a new node at location /apps/granite/operations/config/maintenance/_granite_daily. Following are the properties that we have set for this node.

<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:granite="http://www.adobe.com/jcr/granite/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="sling:OrderedFolder" sling:resourceType="granite/operations/components/maintenance/window" name="Daily Maintenance Window" windowEndTime="3:00" windowSchedule="daily" windowStartTime="0:00"> <granite:RevisionGC/> </jcr:root>

Underneath this node you must create another node /apps/granite/operations/config/maintenance/_granite_daily/_granite_RevisionGC with the following content.

<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:granite="http://www.adobe.com/jcr/granite/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" jcr:primaryType="nt:unstructured" sling:resourceType="granite/operations/components/maintenance/task" granite.maintenance.name="RevisionCleanupTask" granite.operations.condition.runmode="crx3" />

This way you can define the time when the RevisionGC should be executed. I think it's also possible to define multiple nodes of type granite/operations/components/maintenance/window and run it multiple times a day but I never checked if it's actually working.

Like I said this is how we do it in AEM6.0 but I guess it's the same in 6.1.

Cheers

View solution in original post

0 Replies

Avatar

Correct answer by
Level 3

Hi

I don't know about AEM 6.1 but with AEM 6.0 you could create a new node at location /apps/granite/operations/config/maintenance/_granite_daily. Following are the properties that we have set for this node.

<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:granite="http://www.adobe.com/jcr/granite/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="sling:OrderedFolder" sling:resourceType="granite/operations/components/maintenance/window" name="Daily Maintenance Window" windowEndTime="3:00" windowSchedule="daily" windowStartTime="0:00"> <granite:RevisionGC/> </jcr:root>

Underneath this node you must create another node /apps/granite/operations/config/maintenance/_granite_daily/_granite_RevisionGC with the following content.

<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:granite="http://www.adobe.com/jcr/granite/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" jcr:primaryType="nt:unstructured" sling:resourceType="granite/operations/components/maintenance/task" granite.maintenance.name="RevisionCleanupTask" granite.operations.condition.runmode="crx3" />

This way you can define the time when the RevisionGC should be executed. I think it's also possible to define multiple nodes of type granite/operations/components/maintenance/window and run it multiple times a day but I never checked if it's actually working.

Like I said this is how we do it in AEM6.0 but I guess it's the same in 6.1.

Cheers

Avatar

Community Advisor

I dont see there is any configuration option given for this. You might have to export that jar and change the scheduler time

Avatar

Level 4

Thanks John.

I try to config this node, and it also working on CQ6.1.

I just add two propertis windownEndtime and windowStartTime at location /apps/granite/operations/config/maintenance/granite:daily which is working fine.