Schedule Publishing Items in Sitecore

Hello Sitecorians,

You can now easily configure Sitecore Items for Scheduled Publishing using Sitecore PowerShell Extensions. PowerShell has a great Power. It saves developer life a lot by providing the way of Integrated Scripting Environment and without Web Deployment, you can execute the script on the different environments easily.

Schedule Publishing Items – A Sitecore MarketPlace Module 🙂

Schedule Publishing Items

It allows you to set the following options:

  • Items To Publish
  • Date and Time
  • Publishing Target
  • Publishing Language
  • Publish subitems

On date-time arrival – once the scheduled task is executed the script will start publishing items if the values are selected properly.

Make sure item is not in workflow and is allowed to publish, otherwise it won’t be published.

This module has following Items:

1) PowerShell Script – /sitecore/system/Modules/PowerShell/Script Library/Schedule Publishing Items/Internal/ISE Plugins/Scheduled Publish
2) Schedule Task: /sitecore/system/Tasks/Schedules/Schedule Publishing Items
3) Template Configuration: /sitecore/templates/Modules/Scheduled Item Publish/Schedule Items
4) Configured Item for Scheduled Publishing: /sitecore/system/Modules/Schedule Publishing Items/Schedule Items_DD-MM-YYYY

You can create any number of configured items for publishing at – /sitecore/system/Modules/Schedule Publishing Items/

Schedule Items_DD-MM-YYYY — This is just a sample item without properly selected values. You just need to add the values properly and Enable the checkbox for publishing at Scheduled Time.

Scheduled Publish Item

There is an option to disable an item or delete an item once publishing is done so that it should never process next time when the scheduler looks for the scheduled publishing task. If you do not select to disable an item after publishing is done and do not select to delete an item then it will execute every time the scheduler check for schedule items to publish as the time is passed away.

Note: The script will execute, once the scheduler starts scheduling jobs. The default time is 10 minutes, so every 10 minutes system will check for scheduled publishing. Therefore, while setting the time you need to be aware of the scheduled task execution time. Refer below in your config. If you have changed the value then it will work accordingly.

<!– An agent that processes scheduled tasks embedded as items in the master database. –>
<agent type=”Sitecore.Tasks.DatabaseAgent” method=”Run” interval=”00:10:00″ name=”Master_Database_Agent”>
<param desc=”database”>master</param>
<param desc=”schedule root”>/sitecore/system/tasks/schedules</param>
<LogActivity>true</LogActivity>
</agent>

PowerShell will to your scheduled publishing.

Reaction GIF - Find & Share on GIPHY

And you can enjoy your weekend.

Thread GIF - Find & Share on GIPHY

Happy Scheduling! 🙂

Publish Bulk Items in Sitecore using Sitecore Powershell Extensions

Every Sitecore site will have a different set of requirement and one of the requirement could be Publish Bulk Items in Sitecore. If you have the same requirement then you are at right place. 🙂

Publish Bulk Items In Sitecore

 

This post is in accordance with my previous two posts:

  1. Export Sitecore Items
  2. Update Sitecore Items

This might be the case for your requirement, first Export Sitecore Items, then it could be Update Sitecore Items in bulk and then I’m sure there would be the third one to Publish Sitecore Items in Bulk.

I’ve written Sitecore Powershell script which would do the job easier. In Update Sitecore Items — I provided the sample file, the same file you can use for Bulk Publish.

Sample CSV File: pt_Publish_Sitecore_Items (I generally prefix the file with language so that we know which language version items are getting published)

Below script will first ask the user for the CSV File. Then it will ask for Target Database to publish Sitecore Items — The reason for providing this option is because every Sitecore site have the staging environment and it’s always better to verify the changes. So you can accordingly select the target database and after verifying you can push it Live. Once processing is done file will be deleted. Publish Mode is set to Smart.

Note, Sample CSV File has two important columns which are required by this script, ItemPath and Language — Items will be published in the provided language.

Read More