Skip to content

Duplicate-cron complains about WP core functionality (publish_future_post) #154

@jespervnielsen

Description

@jespervnielsen

Bug Report

Describe the current, buggy behavior

wp doctor check --all --spotlight
Complains about duplicate cron-jobs.

The duplicate cronjobs is "publish_future_post"
Which is WP Core generating those "single-events" to publish post in the future.

If a site is using this functionality, and have more than 10 post set to the future, WP Doctor command will give an error.
Even through its expected behavior.

it could be argued that WP Core, should have the post_id as part of the single-cronjob naming, but thats not the case.

Example of WP Core registrering cronjobs using a non-unique key https://github.com/WordPress/WordPress/blob/87cdca8cd61887cd6685c0e11a06e913415524a7/wp-includes/post.php#L4514

maybe a simple solution could be to check if the saved parameter, is the same on multiple jobs.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions