How do I trigger a specific template rebuild in MT 4.2?
September 17, 2008 12:43 PM   Subscribe

MovableTypeFilter: How do I initiate an automatic rebuild of a specific template at a given time under MT 4.2? The upgrade from 4.1 to 4.2 has broken my cron jobs, which have worked for years. Grrrr!!!!

I have two templates that I want rebuilt every night at midnight. I used to run a cron job like this:

[path to file]/mt-rebuild.pl -mode="index" -blog_id="1" -template="Template Name"

I don't even see the mt-rebuild.pl file as existing anymore, and the MT "documentation" is really poor. At one point it mentions that the old system has been replaced by TheSchwatz, Job and Worker, but never addresses how to set any of these up beyond the vague basics suggestion that they CAN be set up.

I realize I need to change the setting of the template to wither Manual or Via Publish Que, but how do I trigger the automatic rebuild at midnight?

Help! I'm at wits end here...
posted by 2oh1 to Computers & Internet (5 answers total) 1 user marked this as a favorite
 
The Publishing Queue is still not what you want for arbitrarily-scheduled rebuilds like this; it manages the normal rebuild jobs the application creates, in the background. And "Manual" is the exact opposite of what you're after; that'll make the template never rebuild unless you personally go in there and push the button.

mt-rebuild.pl is not part of MT. It's a utility script by Tim Appnel. I can't tell you why it disappeared, but you probably trashed it by mistake while upgrading, depending upon what method you used.

(As a sidenote[private if you want], is there a reason you're not using the actual MT forums?)
posted by Su at 1:46 PM on September 17, 2008


(As a sidenote[private if you want], is there a reason you're not using the actual MT forums?)

Yep. My experience with their forums has been hit or miss. Take, for example this question, which sat unanswered on the MT forums for months, yet was answered almost instantly after posting here.
posted by 2oh1 at 2:24 PM on September 17, 2008


A-ha. In case this proves useful for anyone else, I'll post the solution to my problem. It's a combination of manual rebuilds and the mt-rebuild script.

"Manual" is the exact opposite of what you're after; that'll make the template never rebuild unless you personally go in there and push the button.

Precisely. Set a template to manual rebuild, and then create a cron job to have the mt-rebuild script trigger the rebuild of it.
posted by 2oh1 at 2:54 PM on September 17, 2008


Oh, right. Forgot you did still need the manual setting here. I blame sleep dep.
posted by Su at 5:12 PM on September 17, 2008


No worries! You pointed me in the right direction. Thanks!
posted by 2oh1 at 9:50 PM on September 17, 2008


« Older Apache + 20 virtual hosts + awstats?   |   Help me find an annoying Flash animation from way... Newer »
This thread is closed to new comments.