Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.
SOLVED

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

Avatar

Level 2

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.

1 Accepted Solution

Avatar

Correct answer by
Level 2

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.

View solution in original post

5 Replies

Avatar

Community Advisor

Avatar

Level 2

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.

Avatar

Community Advisor

Hi @ryuushihou1990 ,

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

MukeshYadav__0-1756791771924.png

https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/sites/authoring/...
Thanks

Avatar

Administrator

@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

Avatar

Correct answer by
Level 2

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.