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 bytools\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.



