Can we invoke replication api with a specific time content needs to replicate? | Community
Skip to main content
MrShubham
May 10, 2021
Solved

Can we invoke replication api with a specific time content needs to replicate?

  • May 10, 2021
  • 2 replies
  • 1253 views

My requirement is to invoke replication API for a content/asset at a particular time.

As we have an option on the AEM UI for Publishing or unpublishing content later at a scheduled time.

 

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 Kiran_Vedantam

Hi @mrshubham,

 

You can use the Scheduler [AEM Event handling mechanism] to achieve this.

 

Sample scheduler code: https://medium.com/adobetech/handling-sling-schedulers-in-aem-as-a-cloud-service-cb59d5e59e9

Sample replication code: https://aem.redquark.org/2018/10/day-19-replication-api-in-action.html

Utilize these examples to achieve your use case.

 

Hope this helps.

 

Thanks,

Kiran Vedantam.

2 replies

Kiran_Vedantam
Community Advisor
Kiran_VedantamCommunity AdvisorAccepted solution
Community Advisor
May 10, 2021

Hi @mrshubham,

 

You can use the Scheduler [AEM Event handling mechanism] to achieve this.

 

Sample scheduler code: https://medium.com/adobetech/handling-sling-schedulers-in-aem-as-a-cloud-service-cb59d5e59e9

Sample replication code: https://aem.redquark.org/2018/10/day-19-replication-api-in-action.html

Utilize these examples to achieve your use case.

 

Hope this helps.

 

Thanks,

Kiran Vedantam.

arunpatidar
Community Advisor
Community Advisor
May 10, 2021

Hey,

you can use sling jobs to schedule replication API event.

e.g. https://redquark.org/aem/day-18-sling-jobs/

Arun Patidar