Expand my Community achievements bar.

SOLVED

On/Off time publishing issues

Avatar

Level 1

Hi there,

We have received reports from our stakeholders that when using the Activate later feature of AEM, they have experienced cases where the page did not automatically activate. We have tried looking at the logs of the pages in question, but nothing conclusive has been determined at this point.

It appears to be very sporadic, and we are having trouble reproducing it at times. I've searched within your knowledge base on Dev.day.com and was unable to find any more information regarding issues with on/time (perhaps I missed it though). 

How can our stakeholders avoid this error occurring? They are having trouble trusting this device since it sporadically fails. Any help is much appreciated!

1 Accepted Solution

Avatar

Correct answer by
Level 8

The first thing to be clear on is are your users leveraging on time/off time or Activate Later - these are different features of the tool and would potentially fail for different reasons. 

on time/off time is a value that you set in a page's Page Properties, once set you actually publish the content (either through workflow or through the activate button) and the content exists on the publish server. The framework that processes requests however evaluates the on time/off time value at run time and if the the current date and time are before the on time or after the off time it returns a 404 as if the page did not exist. The most likely cause of on time/off time appearing to fail would be a problem flushing dispatcher cache. You can set dispatcher cache flush agents to flush cache as on time/off times are hit but it is possilble for that mechanism to fail, so if you are diagnosing the problem you would want to focus on whether or not a dispatcher flush request was sent at the appropriate time or not. Lots of reasons for this fail but first you want to establish if the request go sent so you can assess whether the problem is at the dispatcher layer or the replication agent layer. 

Activate Later works differently - when choose to activate later (or deactivate later) the system actually starts a workflow and and sets up a Sling Schedule Job to kick off at the right time and advance the workflow to actually publish the content. There are any number of reasons this might fail - you will want to look at the workflow history to see if the workflow in question finished abnormally or perhaps went stale - typically though the likely cause of the problem is related to the workflow. 

View solution in original post

3 Replies

Avatar

Level 7

Hi Tanner,

We have to set configuration to publish/unpublish pages using onTime/offTime.

  1. Go to Default Agent via http://<host>:<port>/etc/replication/agents.author/publish.html .
  2. Click on "Edit" button of "Settings".
  3. Click on "Triggers" tab.
  4. Check "On-/OffTime reached" checkbox.
  5. Click OK.

I hope it will work.

Thanks,

AryA.

Avatar

Correct answer by
Level 8

The first thing to be clear on is are your users leveraging on time/off time or Activate Later - these are different features of the tool and would potentially fail for different reasons. 

on time/off time is a value that you set in a page's Page Properties, once set you actually publish the content (either through workflow or through the activate button) and the content exists on the publish server. The framework that processes requests however evaluates the on time/off time value at run time and if the the current date and time are before the on time or after the off time it returns a 404 as if the page did not exist. The most likely cause of on time/off time appearing to fail would be a problem flushing dispatcher cache. You can set dispatcher cache flush agents to flush cache as on time/off times are hit but it is possilble for that mechanism to fail, so if you are diagnosing the problem you would want to focus on whether or not a dispatcher flush request was sent at the appropriate time or not. Lots of reasons for this fail but first you want to establish if the request go sent so you can assess whether the problem is at the dispatcher layer or the replication agent layer. 

Activate Later works differently - when choose to activate later (or deactivate later) the system actually starts a workflow and and sets up a Sling Schedule Job to kick off at the right time and advance the workflow to actually publish the content. There are any number of reasons this might fail - you will want to look at the workflow history to see if the workflow in question finished abnormally or perhaps went stale - typically though the likely cause of the problem is related to the workflow. 

Avatar

Level 3

When using the list component provided by aem-core-wcm-components it returns pages that are not valid for the given time period, resulting in a link. The link when clicked returns a 404 which one would expect.

This functionality works as expected on the foundation list component, but unfortunately this component does not work for child pages with no specified parent when used as part of a Dynamic Template.

Looking at the code on github aem-core-wcm-components/ListImpl.java at master · Adobe-Marketing-Cloud/aem-core-wcm-components · Gi...  I wonder if a call to isValid is required before adding the page to the list.