One of the built-in feature in Sitecore is the ability to automate publishing which allows authors to use publishing restrictions and release content in specific time or any time in the day, regardless of office hours.
Enable scheduled publishing
At sitecore.config file, set up a publish agent to run on a specific interval “Sitecore.Tasks.PublishAgent”, also you can change other options like languages, target and source database. This will perform a publish for whole Publish.Queue table (incremental mode) in the database. Basically, all item that have been modified and have no publish restrictions will be published from the source database to the target database. If you wish to perform scheduled publish only for specific items, not the whole database, make sure to set up publishing restrictions on items.Configures publishing Timing
Using the button ribbon [Publish > Change Button in ribbon > Publishing Settings dialog box] you can configure future publish date for an item (from and to) by setting the “Publishable From” and “Publishable To” date and time properties for an item.Note: The same functionality is provided by the fields at the “Publishing” section for the item.
Set up publishing restrictions on items
It’s not recommended to enable automatic publishing for sites which don’t have proper item restrictions. Below restrictions can be apply to items so it will not be affected when run scheduled publish:
- Workflow, any item is not in final workflow state, will not be affected by auto publish.
- Also from button ribbon [Publish > Change Button in ribbon > Publishing Settings dialog box], you can change publish restrictions for item versions.
- At the “Publishing” section of the item, select “Never publish” option.
I hope that was helpful for you! Please do not hesitate to comments or contact me if you have any question. 🌺
Baraa Masri
Email: Bmasri@tanasuk.com
Twitter: @Bara_Masri
No comments:
Post a Comment