Project

General

Profile

Actions

Bug #3541

closed

Posts "Missed Schedule"

Added by Marilynn Johnson over 9 years ago. Updated over 8 years ago.

Status:
Duplicate
Priority name:
Normal
Assignee:
Daniel Jones
Category name:
WordPress (misc)
Target version:
-
Start date:
2014-10-09
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

Hi Redminers,

I had some scheduled posts to the Philosophy Commons recently that say "missed schedule" in the dashboard and never went up (see screenshot image attached). Do you have any idea what this means or how to stop it from happening?

Thanks for any insight!

~Marilynn


Files

schedule.png (33.8 KB) schedule.png screenshot of missed post Marilynn Johnson, 2014-10-09 12:35 PM

Related issues

Related to CUNY Academic Commons - Bug #4430: Scheduled Posts Not WorkingResolvedDaniel Jones2015-08-12

Actions
Actions #1

Updated by Matt Gold over 9 years ago

  • Status changed from New to Assigned
  • Assignee set to Dominic Giglio

Dom, can you please take a look at this? Thank you.

Actions #2

Updated by Boone Gorges about 9 years ago

  • Category name set to WordPress (misc)
  • Assignee changed from Dominic Giglio to Daniel Jones
  • Target version set to 1.7.18

Marilynn, sorry for the delay on this one. Dan, would you mind taking a look at this? I'm not certain how the "Missed Schedule" thing comes up in WP.

Actions #3

Updated by Daniel Jones about 9 years ago

It looks like this is usually a problem with how the server interacts with the default WP Cron. One quick fix is this plugin: https://wordpress.org/plugins/wp-missed-schedule/

I'd make sure to read the 1-star review of it though and see if you still want to install it - the author of plugin has it output some extra HTML that lets him track his user base, and it adds some other weird output, too. It seems like it works though, and most people haven't had any trouble with it.

The other option would be for us to try and figure out where the issue is between the server and WP Cron (something at least kind of like this: http://www.trickspanda.com/2014/03/fix-missed-schedule-posts-wordpress/), but I don't think I can do that on my local setup.

Actions #4

Updated by Boone Gorges about 9 years ago

Dan, thanks for researching this a bit. The technique used by the plugin looks OK to me. The obfuscated code mentioned by one of the 1-star reviews appears to have been removed, but it's true that it still leaves a calling card in the form of an HTML comment. Looking over the changeset history of the code, I'm not really comfortable installing the plugin (and being subject to future updates) but I think we could probably just tear out the parts that we want. Could I ask you to build an mu-plugin that does that? Basically, I'd say do the following: set up an hourly scheduled task that runs a query similar to what happens in the plugin's `wpmu_init()`. This will be a good chance for you to experience the joy that is WP's pseudo-cron system :-D

Actions #5

Updated by Daniel Jones about 9 years ago

Here's my first crack at this: https://github.com/cuny-academic-commons/cac/commit/ed510fdc9eec8442599ada0d7a5dcc246f485203

I think it's fairly straightforward, although I wasn't able to test very carefully since it seems like a lot of the issues are around particular server setups.

I took the method of finding overdue posts from the file in Wordpress core (wp-admin/includes/class-wp-posts-list-table.php) that outputs the "Missed schedule" line. I was at least able to test that the query works and that I am in fact scheduling an event, although something weird was happening where wp_next_scheduled() was returning a timestamp that was less than what time() was returning, suggesting that the next time it was supposed to be run was actually in the past. That was a little disconcerting, not sure if it's something weird with timezones?

Let me know what you think!

Actions #6

Updated by Boone Gorges about 9 years ago

  • Target version changed from 1.7.18 to 1.7.19

Thanks, Dan. I'll take a look and we'll see what we can do about getting this into 1.7.19.

Actions #7

Updated by Boone Gorges almost 9 years ago

  • Target version changed from 1.7.19 to 1.7.20
Actions #8

Updated by Boone Gorges almost 9 years ago

  • Target version changed from 1.7.20 to 1.7.21
Actions #9

Updated by Boone Gorges almost 9 years ago

  • Target version changed from 1.7.21 to 1.8.1
Actions #10

Updated by Daniel Jones almost 9 years ago

Just wanted to check and make sure there weren't any other steps I need to take with this right now.

Actions #11

Updated by Daniel Jones almost 9 years ago

Just wanted to check and make sure there weren't any other steps I need to take with this right now.

Actions #12

Updated by Boone Gorges almost 9 years ago

  • Assignee changed from Daniel Jones to Boone Gorges

Reassigning to myself for review. If you can do anything additional to test the timestamp issue you discussed above, you could probably save me some time :)

Actions #13

Updated by Boone Gorges almost 9 years ago

  • Status changed from Assigned to Resolved

Thanks for your patience here. I think that Dan's plugin should fix this issue. The fix will roll out sorta slowly (it depends on a site's getting traffic) but it should be fully complete within a day or so. Tentatively marking as resolved. https://github.com/cuny-academic-commons/cac/commit/98f7c7b53ba5ab31184e6f496abef33b9f0b687b

Actions #14

Updated by Marilynn Johnson almost 9 years ago

Okay, great thanks! I will update here if I see it does it again at any point.

Actions #15

Updated by Boone Gorges almost 9 years ago

  • Status changed from Resolved to Assigned
  • Assignee changed from Boone Gorges to Daniel Jones
  • Target version changed from 1.8.1 to Future release

After this fix was deployed, it caused CPU utilization to jump, almost bringing down the server. I'm not sure why - the changeset looks OK to me at a glance - but for now I have disabled it. https://github.com/cuny-academic-commons/cac/commit/dbe63309a46e58ca20adf7c2ffedfdc9d61dc4bd

Dan, can I ask you to take another dive into what's going on here? If there's a way that it can be addressed in WP, that might be better still. Probably related: https://core.trac.wordpress.org/ticket/29581

Actions #16

Updated by Boone Gorges over 8 years ago

  • Status changed from Assigned to Duplicate
  • Target version deleted (Future release)

Closing in favor of #4430.

Actions

Also available in: Atom PDF