Scheduling MT4 Posts Sans Cron

| | Comments (0) | TrackBacks (0)
Categories:
As you may know, Movable Type 4 allows you to schedule entries for future posting so that when the time comes, they're automatically posted to your blog site.

This allows you to:

  1. Publish your entries at a steady state even if you're not at the computer; for example by writing a number of entries in advance, and have them published automatically after you've gone on vacation, or
  2. Write your entries while at work, scheduling them for publishing after you've come home. (Not that I'd recommend this, but your mileage in terms of job security may vary.)
I won't go into detail how to configure your MT4, because this is already documented at Moveabletype.org, save to say that it requires you to run a script named "run-periodic-tasks" periodically.

Unfortunately, not all web hosts allow you to open a shell to start the "run-periodic-tasks" script as a daemon, nor do all web hosts allow you to add cron job scripts.

Your web host may instead allow you to specify a web address to visit at specific intervals. With the following short little script, you can call MT4's "run-periodic-tasks" script whenever the script is visited as a web page:

<?
passthru( "cd MT/tools; ./run-periodic-tasks -verbose" );
?>

Yes, it's that short. Name it "MT-run-periodic-tasks.php" (or whatever suits you best), and place it in the root folder of your blog so that "MT," the directory where MT4 is installed, is a subdirectory. You can actually place "MT-run-periodic-tasks.php" anywhere you like as long as it's accessible from a web browser, but then you'll have to change the path in the above script.

If your path to MT4 is www.example.com/MT/, then you should now be able to execute the scheduling script by visiting www.example.com/MT-run-periodic-tasks.php. This is also the URL you insert in your web host's periodically visited web address, if your web host provides such a service.

You can use this trick even if your web host doesn't offer any kind of cron job service whatsoever. Just find a free cron job service online, such as WebCron, Web Service Scheduler, or remote-CRON, or pay a limited amount for a similar service at, e.g., WebBasedCron, and have this service call your script.
  • Currently 5/5
  • 1
  • 2
  • 3
  • 4
  • 5
Rating: 5/5 (1 votes cast)

If you liked this post, share it with others:
  • Digg it!
  • Add to Del.Icio.Us
  • Add to Technorati
  • Stumble It!
  • NewsVine
  • Slashdot
  • Google Bookmarks
  • YahooMyWeb
  • Live
  • Facebook
  • Facebook
  • Add this post to Ma.gnolia
  • Add this post to Reddit
  • Thoof it

Categories

0 TrackBacks

Listed below are links to blogs that reference this entry: Scheduling MT4 Posts Sans Cron.

TrackBack URL for this entry: http://blog.blazingangles.net/MT/mt-tb.cgi/41

Leave a comment

Sign In

About This Entry

This page contains a single entry by Ole Wolf published on September 6, 2007 7:08 AM.

Previous entry: By Demons Be Driven.

Next entry: Joomla Plugin: Joomsayer.

Find recent content on the main index or look in the archives to find all content.

Subscribe to Comments

Recent Comments

Creative Commons License
This weblog is licensed under a Creative Commons License.