Automatically disable items in sitecore

What is the best way to automatically disable items with a specified non-public date.

I have included PublishAgent in the web.config file

<agent type="Sitecore.Tasks.PublishAgent" method="Run" interval="00:00:30"> <param desc="source database">master</param> <param desc="target database">web</param> <param desc="mode (full or incremental)">incremental</param> <param desc="languages">en</param> </agent> 

which correctly published the elements with the date of publication in the future, but does not work for elements that should be published in the future. I am using sitecore 6.4

Is there a good way to make a publication work? I donโ€™t want to write my own code to process it, if there is a better solution.

+4
source share
2 answers

Afaik there is no better way to do this ...

This is a shame as it is a missed feature and something that you (or your users) would expect would work, as you can set these dates.

and a publishing agent, in my opinion, is a bad and easy way to do this (why only an interval, a way out of control ... you donโ€™t want the publication to be deleted in the middle of the most loaded time on the site).

They need the function to work automatically or you can set the publication time, i.e. evyer day at 23:30 or something like that.

So, I would say that the only way to better control this is to make your own function.

+3
source

If you look at the PublishAgent code, you will see that it starts publishing in the usual way, using the standard API for this. This means that everything that is possible with regular publishing is also possible with PublishAgent ...

I wonder if that might help. There is a separate agent for cleaning the publication queue - CleanupPublishQueue . By default, it saves the last 30 days unchanged, but you could change it. And, as you know, incremental publication works with the publication queue - if there is something there, incremental publication selects it. This is just an assumption, but is it possible that by the time the PublishAgent starts the publish queue, does not contain an entry to cancel the publication of this issue?

You can experiment by setting the publishing mode to "smart" in PublishAgent.

+1
source

All Articles