Scheduler service in AEM 6.5? | Community
Skip to main content
New Participant
October 4, 2023
Solved

Scheduler service in AEM 6.5?

  • October 4, 2023
  • 1 reply
  • 885 views

Hi

My objective is to create a scheduler service that check all pages in a specific location in the content tree and verifies is the tags on these pages still exist. The reason for this task is that if a tag, which is referenced on a page is deleted, the reference remains in the property of the corresponding page.

 

What would be a preferred way to solve this?

 

Thanks in advance.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Hemalatha

Hi @anasustic ,

 

To resolve your issue, you should write a sling event listener which should get triggered if there are any tag deletions in a particular path level and then your code should query the reference of that deleted tag and remove it. Hope this helps. 

 

Regards,

Hemalatha

1 reply

Hemalatha
HemalathaAccepted solution
New Participant
October 4, 2023

Hi @anasustic ,

 

To resolve your issue, you should write a sling event listener which should get triggered if there are any tag deletions in a particular path level and then your code should query the reference of that deleted tag and remove it. Hope this helps. 

 

Regards,

Hemalatha

anasusticAuthor
New Participant
October 5, 2023

Thank you so much @hemalatha I have two content locations with tags /content/cq:tags/path1 and /content/cq:tags/path2. These are then used in articles.

Hemalatha
New Participant
October 5, 2023

Make sure you are creating an event listener which should listen for updates in these paths - tags /content/cq:tags/path1 and /content/cq:tags/path2 and accordingly query the tags used in articles folder and update the same.