0

I am using Sitecore 9.1 and I set future publish/unpublish dates for some of the items. I found two articles to do this:

This article talks about

1. Download the AUTOMATED PUBLISHER module from the Sitecore Marketplace.
 
2. Have your Sitecore implementers write your own custom code that is triggered by a Sitecore Task. 

https://www.techguilds.com/Blog/2018/11/scheduled-and-advanced-publishing-with-sitecore-part-2

and

This article, which advises to do it by patching values in the config file:

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

https://community.sitecore.net/developers/f/8/t/5496

Is auto-publishing built OOB in any version (in my case 9.1) ? If not, which of the above would be the preferred way to do this?

0

2 Answers 2

3

Publish and unpublish automatically, is OOTB in Sitecore, in which you need to set interval in below config:

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

and need to set publish/unpublish date and time.

Note: Publish/Unpublish will not happen on exact time as it check on particular interval, not on exact time

1
2

Both options come with advantages and drawbacks:

  1. Sitecore PublishAgent publishes all changed items, even if the editor didn't want its changes to be published unless he sets proper publish dates on each item. You can also overcome this by implementing sitecore workflows. You would need to also take a look at how many items are being published so that the editors aren't affected by getting their publish operations queued. I would say go with this option only if it suits all these scenarios.
  2. If you need scheduled publishing at a more granular level and more editor friendly, you can use the marketplace module, it automatically creates a schedule item for each publish action and you have more control as to what is being published. The drawback of this option however is that you need to update the module when doing a sitecore upgrade.
1
  • Thank you for explaining. I think this makes it very clear! Commented Sep 15, 2021 at 15:15

Not the answer you're looking for? Browse other questions tagged or ask your own question.