default userpic

Recursive Scheduled Publish

Vote 0 Votes

I have 2 rss feeds in a given blog which are generated by 2 different templates. I want to publish RSS-1 every hour and RSS-2 once a day. How do I do this in MT?

I tried publish queue but it seems that it acts on the whole instance and can not be configured at template level for interval.

I am open to any suggestions or options to find a solution to this requirement. Thanks

Reported on Movable Type 4.2

4 Replies

| Add a Reply
  • Here's a work around:

    1) Enable template module caching.

    2) Create a template module for the contents of each of those templates you listed above.

    3) Set the expiration time on the first to 1 hour, set it to 1 day on the RSS 2 module.

    4) Change the content of the RSS index templates to have a single statement <mt:Include module="MODULE_NAME">

  • default userpic

    Hi Mike,

    Thanks for your reply.

    As per your suggestion I implemented the 'scheduled publishing recursively on different interval' using 'template module caching'. But there seems to be one issue in this approach.

    Point 1: MT is able to cache the index template(s) - which means it does not publish the 'Index Template' until the expiry of the 'Template Module' included in it.

    Point 2: MT also does not publish the 'Index Template' BY ITSELF after the expiry of the 'Template Module' included in it. - you need some trigger point which publishes index templates like [write an entry] / [set up a cron job via publish Q] / [manually publish]

    Point 3: Consider a usecase -
    A) The expiry time for 'Template Module' is set to 5 mins which is included in an Index Template 'RSS'.
    B) At 12:10pm all index templates were published including RSS - so all files are up to date
    C) Editor logs in and publishes a new entry at 12:11pm - this will publish all index templates EXCEPT RSS
    D) RSS is not published because it was cached at 12:10pm and will not publish until 12:15pm

    E) At 12:15pm, I have nothing to publish which means the newly published Entry will never appear in my RSS until somebody publishes the index template after 12:15 ? Am I correct ?

    Is there a solution to it ? (I can set a cron job at minimum time possible)

    Also I have another finding, can you please confirm on it: When you use the Publish feature of MT it will publish only those templates whose output have some update. If there is no change in the final output file - it wont publish it ?

    Thanks,
    Ashish

  • Try this, then. Add it to your crontab and you should be good to go.

  • default userpic

    Thanks Mike.

    mt_rebuild seems to be the right candidate for this kind of requirement.

Add a Reply

Forum Groups

513 1681

Last Topic: Google Analytics by Argentina Elections on May 27, 2009

202 880

Last Topic: Welcome to Movable Type by solle on May 27, 2009

49 204

Last Topic: Odd problem with searches - need help by Phill M on May 24, 2009

11 42

Last Topic: Community Solution -- but where? by webmoney on Mar 16, 2009

25 99

Last Topic: Search enhancement? by Rob on Apr 14, 2009

10 21

Last Topic: Comment Box Missing by rushskeith on Jan 9, 2009

90 318

Last Topic: Getting to the settings on Post Office by Rob G on Apr 2, 2009

code.sixapart.com

104 373

Last Topic: Login/Registration issue by Gaurav Sharma on May 26, 2009

90 307

Last Topic: HTML Printer-Friendly page shrinks by Mikki on May 19, 2009