Try our conversational search powered by Generative AI!

Content Expired Event



There is already a post for this question but it seems to be archived for new posts. Please refer to

Is there an event that runs when the content is expired or is expiring? I tested SavingContent but it does not get fired in this case. I am also not interested in scheduling/scheduled content since they run at the time when the page is marked with an expiration date, not at the time of the expiration date.

Feb 04, 2019 11:26

There is no such event

Feb 04, 2019 12:42

I see. Getting expired pages as descriped in this post is possible but running a job that controls this often (once every couple of minutes) does not feel right. 

I wonder if there are any other approaches I can take for this problem. I need to run a specific function as soon as the page becomes expired.

Edited, Feb 04, 2019 13:40

There is an Episerver scheduled job called 'Archive Function' that periodically runs based on its settings to perform the in-built archiving of expired pages. 

I think that for you to pick up expired pages, you would be able to fairly easily create a new job that does something similar, but instead of archiving it performs whatever action you need to do. Does that help?

Feb 05, 2019 0:36

What do you need the expired event for? There is no change to the content at that point, it just the time in StopPublish value is passed. If you have fairly small amount of content then it might be OK to iterate over time. However, if you have a few thousands or more, then that's less than optimal.

Feb 05, 2019 10:12

Marcus and Quan, thank you for your responses.

I saw somewhere on this forum that there is a stored procedure that selects archived pages. While in theory it is possible to run it as frequent as possible, it might not be the smartest option to act in such manner. I need to act within seconds after the page is archived if not immediately.

Quan, do you think iterating couple of hundred pages every minute would be optimal? 

Feb 07, 2019 8:38

Not directly to the database. That wouldn't be good.

I'm pretty sure that this value will be available in the Find index... you could maybe use that?

Feb 07, 2019 8:39
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.