My old blogs

There are some old bogs on Sitecore are listed at the url

http://sitecoreinfoexpert.blogspot.in/

Advertisements

Sitecore automatic publishing

In Sitecore there is good provision to do scheduled publishing. There is a agent named “PublishAgent” which is configured in web.config.

<!-- Agent to publish database periodically -->
<agenttype="Sitecore.Tasks.PublishAgent"method="Run"interval="00:00:00">
<paramdesc="source database">master</param>
<paramdesc="target database">web</param>
<paramdesc="mode (full or incremental)">incremental</param>
<paramdesc="languages">en, da</param>
</agent>
This is disabled by default. To enable it, we need to set the time interval.
Good practice is you do with config patch file. Create a xml  file with name “PublishAgent.config” and put it in “/App_Config/Include”folder.
If we have more than one publishing target then this can be configured as below
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <scheduling>
      <agent type="Sitecore.Tasks.PublishAgent">
        <!-- The time format is "HH:MM:SS" -->
        <patch:attribute name="interval">00:30:00</patch:attribute>
        <param desc="source database">master</param>
        <param desc="target database">web</param>
        <!-- Despite the description, "smart" publish is usable as well -->
        <param desc="mode (full or incremental)">smart</param>
        <param desc="languages">en, da</param>
      </agent>
      <agent type="Sitecore.Tasks.PublishAgent">
        <!-- The time format is "HH:MM:SS" -->
        <patch:attribute name="interval">00:30:00</patch:attribute>
        <param desc="source database">master</param>
        <param desc="target database">prod-web</param>
        <!-- Despite the description, "smart" publish is usable as well -->
        <param desc="mode (full or incremental)">smart</param>
        <param desc="languages">en, da</param>
      </agent>
    </scheduling>
  </sitecore>
</configuration>