359 Lotus blogs updated hourly. Who will post next? Home | Downloads | Events | Pods | Blogs | Search | myPL | About 
Latest 7 Posts
Drug or Drug Device Portals
Thu, Oct 23rd 2014 51
IBM, Microsoft to Let Each Other Use More Software in The Cloud
Wed, Oct 22nd 2014 100
Dreamforce: Community Cloud for Healthcare
Tue, Oct 14th 2014 69
Salesforce Community Cloud Roadmap for 2015
Tue, Oct 14th 2014 78
Successful Partner Communities with Salesforce
Tue, Oct 14th 2014 74
Creating Customer Happiness with Salesforce Communities
Mon, Oct 13th 2014 77
Content Marketing is Inherently Flawed?
Fri, Oct 10th 2014 77
Top 10
IBM Digital Experience v8.5 – What’s Been Removed or Deprecated
Mon, May 12th 2014 1236
Official Sitecore Training – Recommendations on Who, What & When
Sun, Dec 23rd 2012 768
Perficient discusses Salesforce Communities
Mon, Jun 9th 2014 351
Adobe Summit: Top new features in Adobe Experience Manager WCM
Wed, Mar 26th 2014 299
Adobe Summit: The Convergence of Search and Social
Thu, Mar 27th 2014 294
Gartner Magic Quadrant for Horizontal Portals 2013
Wed, Sep 25th 2013 286
Are Portals Really Dead?
Mon, Jun 30th 2014 280
WebSphere Portal and UI Myths and Facts
Wed, Jul 30th 2014 277
Google: Reasons Why Nobody Uses Your App, Your Site, Your…
Thu, Jul 17th 2014 272
Hilton Changes The Game, Mobile Enables It
Tue, Jul 29th 2014 264

Scheduling Future Item Publishing in Sitecore
Jamie Stump    

Whenever we work with a client on a Sitecore implementation, it is inevitable that at some point in the process, the question of scheduling future publishes will come up.  The question is usually phrased something like “Does Sitecore allow me to schedule an item to be published in the future?”  Every time it comes up, I have to chuckle a little to myself, because of the answer that immediately pops into my head.  That answer is “Well, out of the box, sort of, kind of, but not really, no, at least not in an effective real-world manner.  But yes, that can be done.”  And I legitimately think that’s the “right” answer.

I know, you’re now saying to yourself, “How can that be the right answer?  You said yes and no and yes again all at the same time, and still managed to not really say much of anything.”  Well, let me explain.  Out of the box, Sitecore gives the content editors the ability to restrict the publication of any given item (or even specific versions of an item) right in the desktop.  To see this in action, navigate to the “Publish” menu of the Sitecore Desktop Ribbon, and click the Change button in the Restrictions section.  You will get a pop-up that now lets you put in dates for both when an item should go live, and if necessary, when it should be removed from  being live.  The following screenshot shows a portion of this popup:

 Sitecore Publish Restrictions

So, now you’ve got to be thinking “That’s awesome, but doesn’t that answer the original question with a resounding ‘Yes’?”  It sure seems to, except for one little caveat – there’s nothing out of the box with Sitecore that does automatic publishing.  So, given the example in our image above, the current item is only to be published between 3/12/12 at 1:30PM and 3/30/12 at 12:30AM, and that’s what will happen when a content manager explicitly publishes the site.  The first time the site is published after 3/12/12 1:30PM, the item I’ve modified above will be published – so if that first time is 3/15 at 8:30PM, then we had 3+ days where our item wasn’t published, but should’ve been.  Likewise, the first publish explicitly performed after 3/30/12 12:30AM will automatically remove our item from being published, but our item won’t disappear a second before that first publish.  This can be a little misleading to content managers who stumble upon the first screen on their own, as it seems to indicate a positive answer to the question “Does Sitecore allow me to schedule an item to be published in the future?”  It’s important that we, as developers make sure they’re aware of exactly what that publish restriction date does and does not do.

So, I think that details the “sort of, kind of, but not really, no” portion of my answer – now let’s get to the “But yes, that can be done” portion, which is obviously the part clients care most about – the “Yes, I can help you make that happen” part.  A coworker of mine has written some code that when called by a scheduled task, will perform a smart publish on a given site.  The code is thus:

   private void PerformSmartPublish()
         string ProductionWeb = ConfigurationManager.AppSettings["ProductionSiteCoreDB"];

         Database dbSource = Sitecore.Configuration.Factory.GetDatabase("master");
         Database dbTarget = Sitecore.Configuration.Factory.GetDatabase(ProductionWeb);

         Language[] dbLanguages = dbSource.Languages;

         Database[] dbTargets = new Database[] { dbTarget };

         PublishManager.PublishSmart(dbSource, dbTargets, dbLanguages);

Once you’ve got that code, you simply need to put it in a place that allows you to call it in a schedulable way.  There are lots of options to do this.  One way is to call the above code from a particular webpage that, while publically accessible, is not publicized as  a part of your Sitecore site (IE: a page that no one knows exists).  Once you have that page, you can schedule a windows task to call your page at a regular interval, and it will automatically perform a smart publish on your site.

Now you have the means to allow Content Managers to administer date restrictions on when items should be published through the Sitecore desktop, and a means to do automatic publishing through a small bit of custom code.  It’s important to note the ramifications of a scheduled publish though.  If your site requires that content goes live at the same time on any given day, you can get away with having your scheduler only call the above code once a day at the proper time.  This should be completely acceptable, and really happen without a hitch.  However, what if your site might need content that goes live at 8:30AM, or 8:45AM, or 12:17PM, or any other arbitrary time of any given day?  Well, then you need your scheduled task to run much more frequently – possibly once every minute.  It’s certainly possible to set your task up to do this, but there will absolutely be an increased amount of processing strain placed on your server to run this code continuously.  Having the ability to publish automatically whenever we want to does not make doing so a best practice.   Another consideration that needs to be clearly communicated to all of your Content Editors when implementing an automatic publish feature is how it affects their items.  Any item that is not in a non-final workflow state, and doesn’t have publishing restrictions upon it will be published by the above code.  That means, if you have your auto-publish scheduled to run at 8:00AM every day, and a content editor saves a change to an item (without any workflow attached to it) at 7:59AM, but does not intend for that item to be published right away, they will be out of luck, because it will be published automatically.

We should be prudent here and say that implementing the above code alone does not preclude a content manager from explicitly performing their own Sitecore publish at anytime they wish.  Our code could be used as the sole means of publishing by removing publish rights from all content editor permissions within Sitecore, thus ensuring that the site is only published when it is scheduled to be.  Our code can just as easily be used in addition to “on-demand” publishes performed by content managers to help prevent items that should be published / unpublished on a schedule missing their target dates.  If you have content managers who are really on the ball, it’s also conceivable they will do regular publishes when they need to be done and you don’t have to implement an auto-publish at all.  Each Sitecore implementation should have its own business rules relating to the publishing of content, and those rules should dictate the methodology that is used.

So, the next time you hear someone ask (or have the question yourself) “Does Sitecore allow me to schedule an item to be published in the future?”, you can feel free to quote me by saying “Well, out of the box, sort of, kind of, but not really, no, at least not in an effective real-world manner.  But yes, that can be done.”, and have confidence that yes, this can be done without a lot of effort!

Mar 09, 2012
31 hits

Recent Blog Posts

Drug or Drug Device Portals
Thu, Oct 23rd 2014 10:12a   Michael Porter
Eugene Sefanov has a nice post on the value of a patient portal for those who use a specialty drug or drug device.  He goes into some detail on the possible use cases with that kind of portal.  I like the approach  he takes.  Just being prescribed a drug doesn’t mean you are going to get the right outcome.  Anything you can do to ensure the patient has all the support he or she needs will improve that outcome. An effective way to provide patient support is through a portal that is sp [read] Keywords: collaboration application mobile

IBM, Microsoft to Let Each Other Use More Software in The Cloud
Wed, Oct 22nd 2014 8:14p   Michael Porter
Interesting news came today.  Two software behemoths and sometime fierce competitors have decided that co-opetition may be the best model.  IBM and Microsoft today announced a partnership making it easier for cloud customers to access each other’s software. The News IBM cloud users will be able to get Microsoft products like Windows Server and SQL Server, while customers of Microsoft’s Azure service can use IBM’s WebSphere Liberty and DB2, the companies said today in a statement. Cl [read] Keywords: ibm db2 enterprise google java linux microsoft office oracle server sql virtualization websphere

Dreamforce: Community Cloud for Healthcare
Tue, Oct 14th 2014 10:15p   Mark Polly
All this week I’m at Dreamforce, the annual Salesforce conference.  Salesforce has come a long way with their platform and they’ve recently introduced Community Cloud.  Community Cloud is an evolution of their portal product and includes many features that we see in other enterprise-class, horizontal portals. We are seeing a lot of interest in portals from our healthcare clients.  At Dreamforce, I attended a session on using Salesforce Community Cloud in healthcare.  I blogged [read] Keywords: community enterprise

Salesforce Community Cloud Roadmap for 2015
Tue, Oct 14th 2014 2:15p   Mark Polly
Salesforce Community Cloud can be used for a variety of applications, including sales communities, customer self-service, marketing campaign management, or anywhere you need portal, content and social combined into one experience. At Dreamforce 2014, Salesforce has been having a lot of sessions related to communities and I’ve seen a lot of communities focused on partners.  That is if you are company that has sales partners, dealers, etc. a partner community would be relevant to you.   Th [read] Keywords: application applications community facebook linkedin mobile networking profile twitter

Successful Partner Communities with Salesforce
Tue, Oct 14th 2014 12:18p   Mark Polly
Zero Motorcycles needed a way to consolidate multiple partner facing systems into a simplified user interface, track sales and monitor participation programs and automate workflows. As we’ve seen from other customers, partners had to login to multiple systems.  Using Community Cloud, Zero was able to provide one interface for the partners to login into and get information and process leads and improve sales. Zero’s original model was B2C, thinking that consumers would order electri [read] Keywords: collaboration community exchange exchange interface mobile

Creating Customer Happiness with Salesforce Communities
Mon, Oct 13th 2014 3:12p   Mark Polly
Community Cloud is Salesforce’s newest and fastest growing cloud (until tomorrow).  IDC has seen a huge jump in using social media to communicate with customers and respond to customer inquiries.  The top 3 technologies that are planned to be used include discussion forums, public social networks, and online communities, which is where Community Cloud comes in. Constant Contact Constant Contact, an all-in-one marketing platform, has over 600,000 small business customers. Constant Contact us [read] Keywords: administration collaboration community

Content Marketing is Inherently Flawed?
Fri, Oct 10th 2014 11:12a   Michael Porter
In the past week I’ve either read or listened to two heads of global marketing for two well known brands.  Both had a similar story with different sides of the same coin.  Both had a message that dealt with Marketers having to forget about telling their brand story and go with what customers want to hear.  The first was a session about leveraging social data with Michelle Lapierre who is the Sr. Director of Customer Experience at Marriott Rewards. The second is an article at cmo.com dis [read] Keywords: facebook linkedin oracle twitter

Why Do Contextual Ads Fail
Tue, Oct 7th 2014 3:12p   Michael Porter
I’ve blogged about the personalization failure before.  Now it looks like others are catching on to the ultimate failure on their part………… even as they harvest huge amounts of private information about us.  This article in ComputerWorld outlines the issues.  The author Mike Elgan hits the topic of privacy quickly and never lets it go: Companies like Google, Facebook and Amazon violate our privacy in order to show us relevant ads. So why do their ads miss the mar [read] Keywords: facebook google


Gartner Magic Quadrant for Horizontal Portals 2014: Seeing Shifts
Mon, Oct 6th 2014 8:13a   Mark Polly
Gartner has released its Magic Quadrant for Horizontal Portals 2014 and it contains some interesting surprises.  For the first time in several years, Gartner has moved IBM and Liferay ahead of the other vendors in both vision and execution ability. Gartner Magic Quadrant Horizontal Portals 2014 The leaders for 2014 are still the same leaders as in 2013 and 2012.  For the past few years IBM, Microsoft and Oracle have been clustered near each other in the Leader’s quadrant, with Liferay an [read] Keywords: ibm application enterprise microsoft oracle sap server sharepoint

A Day in the Life of a Social Media Manager
Mon, Sep 29th 2014 11:11a   Mark Polly
In the BufferSocial blog, Kevan Lee posted an article for Social Media Managers.  The post takes a look a “typical” social media manager’s day and breaks down that day into many different activities, represented in the info graphic here.    Mr. Lee also provides several different views on how other people spend their days managing social media.  One person, Finola Howard, manages to compress all her daily activities into just one hour per day. Her tasks include: Use Socia [read] Keywords: connections ibm networking twitter

Created and Maintained by Yancy Lent - About - Blog Submission - Suggestions - Change Log - Blog Widget - Advertising - Mobile Edition