Help - Search - Members - Calendar
Full Version: Scheduled template rebuilds?
Movable Type Community Forum > Additional Resources > Tips and Tricks
Anaxander
I installed the WeatherUnderground plug-in from http://mt-plugins.org/ and have realized that unless I rebuild My Index often, my Weather stats get stale fast. I've been looking all over for a place that documents how to call the CGI script that rebuilds the index template from the command line. That way I can then use something like cron to rebuild my index file at an hourly rate, thus having fairly fresh WeatherUndergound information.

I can't believe I'm the only one who has ever wanted to do this? I've tried a lot of forums and either I'm searching the wrong keywords or I'm just going about it the wrong way.

Any ideas? Thanks
LisaJill
MTRebuild in conjunction with cron is what you want. You'll have to find out if your host has cron/allows you to use it. =)
weyoftheweb
Also if you haven't got access to cron on your host then you can always run cron on your home box and do the rebuild over XML-RPC.

Thats what I have done smile.gif
SpyderFCS
I've been trying to get my cron job to work but I can't get anything to work at all. I want it to rebuild every 30 minutes to an hour but I can't even get it to rebuild at all. Here are some things I have tried:

QUOTE
/home/username/public_html/cgi-bin/mt/mt-rebuild.pl -mode="index" -blog_id="4" -template="Main Index"

QUOTE
/usr/bin/perl /home/username/public_html/cgi-bin/mt/mt-rebuild.pl -mode="index" -blog_id="4" -template="Main Index"


Those are the main ones. I have tried them with and without the "public_html," the "quotes" after the mode, id, and template, and about a million other things. Anyone?
weyoftheweb
Seeing as you are not getting errors Im guessing cron isnt running. Have you activated cron?

On a UNIX system for instance you set up your cronfile then do:
CODE
crontab cronfile
to alert cron to use your cronfile.
SpyderFCS
and this is where I think I am getting fuzzy. I use ThrillingHill for my hosting and am not sure if I have access to turn cron on and what not. Also, as far as getting error messages, my cpanel does not have the option to enter an e-mail address to have these messages sent. Can I run cron on the server from my computer and if so, what do I need?
weyoftheweb
If you have a cron option on your cpanel then your host supports cron I would assume. And it must run on that machine (where your blog is). Check your hosts FAQ's or maybe drop a support email for some specific help.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.