The Movable Type User Manual

NOTE: This documentation is for Movable Type 3.2. If you are using a newer version, please see the documentation for Movable type 3.3x or Movable Type Enterprise.

« Configuring A Windows Server To Run CGI Scripts | Up | Installing Plug-ins »

Chapter 11: Advanced Topics

Setting Up Scheduled Post Services

Problem

You want to enable Scheduled Post services on your Movable Type System.

Solution

Install the run-periodic-tasks to run under cron or other similar system utility.

Discussion

To set up scheduled posting you need to be able to set up a "cron" job on the server. There a number of ways these services can be implemented and will vary depending on your server environment. Some hosting providers will allow one and not the other.

After you've set up post scheduling, when you save an entry with a post status of "Scheduled," it will be automatically picked up and published by the script when it runs.

Note that you need to use the field labeled "Authored On" on the Edit Entry screen to specify the time when the entry should go live.

cron

If you have shell access to a Unix server you can set up scheduled posting by editing your crontab, the table the cron utility uses to store its assignments:

    % crontab -e

Then add the following line:

    0,15,30,45 * * * * cd /path/to/mt/; ./tools/run-periodic-tasks

This instructs cron to run the script at zero, fifteen, thirty, and forty-five minutes after the hour, every hour. The asterisks are a way of telling cron to do this every hour, every day, every day of the week and month. Make sure you have exactly four asterisks separated by spaces.

/path/to/mt/ should be the path to your Movable Type application directory.

After that, just save the file, exiting your editor, and cron will report that it installed a new crontab.

cPanel

To set up scheduled posting through cPanel, follow these directions:

How do I get to this in cPanel?

In the box labeled "Command to run," enter the path to your Movable Type installation, followed by /tools/run-periodic-tasks:

     cd /path/to/mt/; ./tools/run-periodic-tasks

The timing options can be set to a schedule that suits you; however, it is not wise to run the script more often than about once every fifteen minutes, since it could bog down your server. We recommend the settings "Every fifteen minutes," "Every Hour," "Every Day," "Every Month," and "Every Weekday."

Windows

If Movable Type is running on a Windows server, you can create a scheduled task to achieve the same result. Use the following parameters for your task:

How do I get to this in Windows?

  • Name

    "Movable Type Tasks".

  • Run

    The run command should be the path and filename of your Perl interpreter (i.e., C:\Perl\bin\perl.exe), followed by tools\run-periodic-tasks.

  • Start In

    Should be the full path to your Movable Type directory. Example: C:\Inetpub\wwwroot\mt.

  • Schedule

    The timing options can be set to a schedule that suits you, however, it is not wise to run the script more often than about once every fifteen minutes, since it could bog down your server. We recommend a frequency between every fifteen minutes to once a day.

Submit Feedback on This Article

Your comments on how we can improve this article are appreciated; but please do not use the feedback form to submit support requests or question. We will not respond to or publish such queries submitted through this form. If you have a technical question or problem, visit Movable Type Support.

Six Apart
Makers of weblog software and services for individuals, organizations and businesses.
This website is powered by Movable Type.