私たちの要件は、コンテンツ ページのコンテンツ発行を、Tridion CMS アプリケーションで定期的に実行するようにスケジュールすることです。現在、Tridion 2009 SP1 バージョンを使用しています。
次のような専門家からの提案に従って: Tridion 2009 SP1: 定期的な発行のためにコンテンツ ページをスケジュールする方法は? 以下のように Triond Interop .dll を参照する単純な C# コンソール アプリケーションを作成しました。
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 サーバーでホストし、毎週必要な間隔で実行するようにスケジュールします。