Tridion 2009 SP1: How to schedule a content page for a recurring publishing?

281 Views Asked by At

I need to automate an xml page publishing twice every week using Tridion 2009 SP1. As per my discussion with the SDL support team, there is no out of box feature available. Also I have seen a solution here for 2011 but not 2009 SP1. Can you please help me with some pointers for setting up autopublishing ?

2

There are 2 best solutions below

4
Chris Summers On

As you have discovered, there is no way to do this out of the box. The simplest way to do this is to write a small script with powershell or .net which calls the publish action using TOM via Interop, and schedule it with the Windows Task Scheduler on you CMS or Publishing server. You could also write a windows service, but that may be overkill for this.

If you migrate to 2011 or 2013 you would do well to use Core Service rather than TOM.

0
Nuno Linhares On

A VBScript file to publish a page is really just a couple of lines. I can't test this right now, but using the Tridion Object Model documentation (hint: it's a CHM file) you should be able to fix whatever I missed on this:

Dim pageId, targetId
Dim tdse, page
pageId = "tcm:12-12-64"
targetId = "tcm:0-1-65537"
set tdse = CreateObject("TDS.TDSE")
tdse.initialize()
set page = tdse.GetObject(pageId, 1)
call page.Publish(targetId, false, false, false)

Save this in a .vbs file, which you can execute with cscript filename.vbs. The user running the script must be a valid Tridion user with enough permissions to publish the page to that target. If you are using LDAP, then the user running the script must be a valid impersonation user, and you need to call tdse.Impersonate(ValidUserName) after creating the TDSE object.

Also, pageId and targetId values should match the TCM Uris of YOUR page and target.