Fix WordPress “Missed schedule” error on Media Temple (dv) / Plesk

After a lot of debugging, I was able to figure out that Media Temple’s (dv) configuration was responsible for the “Missed schedule” errors I was getting in WordPress.  By default, the /etc/hosts file looks like this: yourdomain localhost localhost.localdomain

To execute cron tasks, WordPress needs to post to the URL This isn’t usually a problem, but with the above hosts file and Plesk’s Apache configuration, that URL will actually result in a 404 error.

I tried removing and youdomain from the hosts file:  localhost localhost.localdomain
Unfortunately, when you restart the VPS using Virtuozzo in Plesk, and yourdomain will just be added back in.  However, after some exhausting Google searching I found out that you can just move them down to the next line with the proper IP address:  localhost localhost.localdomain yourdomain

Now when you restart the VPS, these changes to the hosts file will remain.

I looked at several other possible solutions to fix the “Missed schedule” problem.  One solution was setting the “ALTERNATE_WP_CRON” constant in the wp-config.php:

define('ALTERNATE_WP_CRON', true);

This activated some very messy redirecting for the user as they browsed the site though.  Not a great solution.  Another solution I was considering was just executing wp-cron.php from a cronjob every hour. Something like this:

0 * * * * /home/yourdomain/htdocs/wp-cron.php >/dev/null
  • Willie Jackson

    1. That comment preview feature is sliiiiiick. Nice!
    2. This is exactly what I was looking for. I’ll be testing it out this week. Thanks for taking the time to post the solution.

  • Ask Questions

    Does adding a some cron job help? I got a lot of blogs where i schedule posts. Now i have to keep checking and publishing them. Its made life difficult.

  • bradt

    Yes, scheduling wp-cron.php to run as a cron job on the server could work as well.

  • Derek

    I have two domains on my (dv) account, one for my main site and the other for anything else. Which IP should I be adding there?

    Also, I have a crontab running it now, but since I use super cache I get an error email so I would really like to get this working.

  • bradt

    @Derek If you don’t know the IP addresses for your domains, you should contact Media Temple for support.

  • Derek

    I know what my IP’s are, that wasn’t my question. My question was which one do I use?

  • bradt

    @Derek If you have two domains with two IP addresses, and your /etc/hosts currently looks like this: yourdomain1 yourdomain2 localhost localhost.localdomain

    You could try something like this: localhost localhost.localdomain
    ip_address1 yourdomain1
    ip_address2 yourdomain2

    If you share 1 ip address between your two domains, you could try: localhost localhost.localdomain
    ip_address yourdomain1 yourdomain2
  • Derek

    I actually have my main domain on one IP and the other 10 or so sharing the other IP. I’ll try and ask MT and see what they say about it.

  • Emily

    Just wanted to thank you for posting this fix, in particular the part about moving the hostname to a second line! Saved me. Cheers.

  • Pingback: (dv) – Shawn Blanc

  • Pingback: Hosts file entries for multiple domains on VPS? - Admins Goodies

  • Pingback: Wordpress: “Missed Schedule” Problem bei Posts beheben » Admins Werk

  • X2 Nation

    Wish I searched for this a couple hours ago :-) …Thanks for posting this you saved me a ton of time Cheers, Robert @ X2

  • Adrián

    Big Thanks! I don’t know if I have to: Like, +1, Tweet, Share, Stumble Upon, Digg or what this article, but was exactly what I need to know.

    Although my “trouble” was using CloudFlare, this workaround fits perfectly

  • Pingback: How to Replace WordPress Cron With A Real… « Riz Notes