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

If you need to share template code, replace all the "<" signs with "&lt;" or use this utility.

Forum Groups

1773 6162

Last Topic: Excluding categories from blog by kholechek on Feb 9, 2012

86 302

Last Topic: website entries by masoud on Oct 26, 2011

1429 5077

Last Topic: What apocalypse hit this community in the middle of 2011? by 75th on Feb 10, 2012

695 2910

Last Topic: Insert Image / File Fails by Russ Miller on Feb 10, 2012

84 291

Last Topic: How to have some other characters in entry basename automatically written by Afshin Haghighatnia on Dec 22, 2011

173 737

Last Topic: About the MT version stated in HTML source by Alex E. Schneider on Feb 7, 2012

190 567

Last Topic: Analytics Reporting by michael webster on Feb 5, 2012

48 210

Last Topic: An idea and also a request by Afshin Haghighatnia on Jun 29, 2011

64 246

Last Topic: jQuery in MT 5.1 still at 1.4 - why? by perlmonkey on May 25, 2011

code.sixapart.com

137 478

Last Topic: Getting a thumbnail with xpath by Peter on Mar 13, 2011

222 720

Last Topic: Custom Field for Asset Not Appearing by android on Feb 9, 2012