How to suppress the default unpublish behavior when adding the onTime property | Community
Skip to main content
ryuushihou1990
Level 2
September 1, 2025
Solved

How to suppress the default unpublish behavior when adding the onTime property

  • September 1, 2025
  • 3 replies
  • 732 views

In our current project, when publishing a page, the workflow includes an approval process after which the page is given an onTime property so that it will be published automatically at the specified time.

 

However, when the workflow adds the onTime property to the page, AEM first unpublishes the page and then republishes it automatically once the specified time is reached.

 

My question is: when adding the onTime property to a page (e.g., /content/projectA/mypage/jcr:content), is it possible to suppress AEM’s default behavior of unpublishing the page?

 

For reference, when the onTime property is added to content under /content/dam, the content is not unpublished—instead, it is simply published automatically once the onTime is reached.

Best answer by ryuushihou1990

First of all, to answer Mr. @mukeshyadav_ : our requirement is customization. That’s why ManagePublication is not an option, since our process needs to include various approval steps as well as email notifications.

 

Next, to respond to Mr. @kautuk_sahni : in the end, I worked around this limitation by checking whether the resource is a page when adding the onTime property. If it is a page, then I trigger a scheduled job at the onTime to call the publish API and publish it. Although this added quite a bit of extra code, it solved my issue at the current stage.

 

Once again, thank you both for your replies.

3 replies

ryuushihou1990
Level 2
September 1, 2025

Thank you for your answer.

However, I couldn’t find in the article how to prevent a page from being automatically unpublished when setting the onTime property.

If you know where this is documented, could you please let me know? Many thanks.

MukeshYadav_
Community Advisor
Community Advisor
September 2, 2025

Hi @ryuushihou1990 ,

You should schedule the publication using the 'Manage Publication' feature that best fits your use case.

https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/sites/authoring/sites-console/publishing-pages#manage-publication
Thanks

kautuk_sahni
Community Manager
Community Manager
September 2, 2025

@ryuushihou1990 just checking in! Were you able to get this resolved? If one of the replies above helped—whether it completely solved the issue or simply pointed you in the right direction—marking it as accepted can make it much easier for others with the same question to find a solution. And if you found a different way to fix it, sharing your approach would be a great contribution to the community. Your follow-up not only helps close the loop but also ensures others benefit from your experience. Thanks so much for being part of the conversation!

Kautuk Sahni
ryuushihou1990
ryuushihou1990AuthorAccepted solution
Level 2
September 2, 2025

First of all, to answer Mr. @mukeshyadav_ : our requirement is customization. That’s why ManagePublication is not an option, since our process needs to include various approval steps as well as email notifications.

 

Next, to respond to Mr. @kautuk_sahni : in the end, I worked around this limitation by checking whether the resource is a page when adding the onTime property. If it is a page, then I trigger a scheduled job at the onTime to call the publish API and publish it. Although this added quite a bit of extra code, it solved my issue at the current stage.

 

Once again, thank you both for your replies.