我們的要求是將內容頁面的內容發佈安排在Tridion CMS應用程序中以循環間隔運行。我們目前正在使用Tridion 2009 SP1版本。在SDL中創建和部署Windows服務發佈頁面Tridion
按照從專家的建議,如:Tridion 2009 SP1: How to schedule a content page for a recurring publishing?我們已經創建了一個引用了一個簡單的C#控制檯應用程序Triond互操作的.dll文件的如下:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Tridion.ContentManager.Interop.TDS;
using Tridion.ContentManager.Interop.TDSDefines;
using Tridion.ContentManager.Interop.msxml4;
using System.Configuration;
namespace SchedulePublish
{
class Program
{
static void Main(string[] args)
{
//Please use your system related corresponding webdav url's and tcm id's where ever required. Below are just sample :)
TDSE tdse = new TDSE();
//Give some identity that has access rights on tridion UI
string Identity = @"Domain Name\Username";
tdse.Impersonate(Identity);
tdse.Initialize();
string targetTypeId = "tcm:0-1-65537";
Publication Pub_Obj = (Publication)tdse.GetPublication("/webdav/30%20DIRECTV%20sites");
XMLReadFilter Filter = new XMLReadFilter();
Component CompObj = (Component)tdse.GetObject("/webdav/30%20DIRECTV%20sites/Home/System/xml/Knavigation.xml",
EnumOpenMode.OpenModeView, Pub_Obj.ID, Filter);
DateTime schedulePublishDate = Convert.ToDateTime(ConfigurationManager.AppSettings["SharedPath"].ToString());
CompObj.Publish(targetTypeId, false, false, false, schedulePublishDate, DateTime.MinValue, DateTime.Now, true, EnumPublishPriority.High, false, 3);
}
}
}
由於我們是新的,請提供指針來實現以下步驟:
1.Tridion CMS服務器沒有安裝Visual Studio,請建議一種方法來運行此應用程序,並驗證我們是否能夠根據需要發佈內容。
2.在Tridion CMS服務器中安裝此應用程序並安排它每週以期望的間隔運行。
也許你可以包含你的App.config - ConfigurationManager.AppSettings [「SharedPath」]似乎是設置預定日期的一種奇怪方式。我也指出了答案在這裏 - http://stackoverflow.com/a/14885307/1088449 – 2013-03-06 04:53:28