Scheduling Posts in WordPress

When I was more active on my photography site, I would normally queue up batches of photos to be posted. For example, I might spend 3-4 hours getting together 6-7 posts that would be rolled out over the upcoming few weeks. I could then use WordPress’ built in scheduling features to decide when those posts would roll out. I have noticed recently, however, that the scheduling of posts on this site seems not to be working. Instead of my post actually publishing when the scheduled time arrived, I was simply getting a “Missed Schedule” marking next to the post. I solved this issue with a two tiered solution:

Cron Job to Call the Website

Though I get decent traffic on the site, visitors normally come in bunches. I, therefore, cannot reliably estimate what times someone will hit the site and fire off the publish functionality. To help remove some of the uncertainty associated with this, I created a very basic cron job1 that simply calls the website every 5 minutes:

*/5 * * * * /[path]/[script].sh

where [path] is some location for your script, and [script.sh] contains simply2

#!/bin/bash
curl https://johnkiv.us

Unfortunately, I would still run into some “Missed Schedule” errors, depending on when I would set my posts to publish.

WP Plugin

In order to fix those posts that were sent to the purgatory of “Missed Schedule” status, I added the WP Missed Schedule plugin to my installation. This plugin works as advertised. It “fixes” those posts that were in the “Missed Schedule” status and publishes them.

Summary

Using the above two steps, I have once again been able to schedule posts for certain times. As you can probably tell from my explanation of the process, it does not guarantee that your post will go out at the exact time that you specified. Instead. it ends up setting a window within which the post might go out3. For what I’m doing currently, that’s more than okay. If, however, you want to be more precise with when your posts go up, you might want to look for a different alternative4.


  1. If you’re unfamiliar with cron, some decent resources are available at unixgeeks.org, thegeekstuff.com, and help.unbuntu.com 

  2. It, of course, has to be marked executable, etc… 

  3. Since the cron job runs every 5 minutes, and the “fix” of mixed posts plugin runs every 5 minutes, the longest you should have to wait for a post to publish after your publish time 10 minutes. 

  4. One possible idea might be to set specific daily times you want to post. You could set various posts to publish at those times and then you could set you cron job to run at those times. For anything dealing with an embargo or some other time of confidentiality agreement, I would definitely recommend doing the post manually at the correct time.