Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jespervnielsen opened this issue Nov 4, 2020 · 1 comment

Comments

@jespervnielsen
Copy link

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.

@danielbachhuber
Copy link
Member

Thanks for the report, @jespervnielsen !

We could include an exclusion for this particular scenario.

Feel free to submit a pull request, if you'd like. Here is some guidance on our pull request best practices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants