Make WordPress Core

Opened 5 months ago

#41965 new defect (bug)

WP Cron job not created for future scheduled post (causing Missed Schedule situation later)

Reported by: andersheie Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.8.2
Component: Cron API Keywords:
Focuses: Cc:


Under these special circumstances, when setting a Future Scheduled date, no WP Cron job is created for the post. It should be noted this happens quite a lot on a daily basis as this is the process I use to create posts.

I have about 16 already scheduled future posts pending.

A) Add a new post 3 days in the future using rest API V2, in draft. – No WP Cron job is scheduled (Which is expected, as in draft mode).

B) Edit the post. Change the date one day backwards BUT DO NOT PRESS OK. Press “Schedule” instead. The post date changes, and the page reloads, but no WP cron job was added (FAIL).

C) Continue to edit the post and change the date back and forth (between future dates, don't press OK, just press 'schedule' each time. This failed twice for me on my little test.

I ran this sequence 6 times, it failed 2 times using step AB and twice on subsequent updates, so in half an hour it was fairly easy to reproduce, but not consistent unfortunately.

Please let me know if you need more information. I doubt that adding the post via REST API is the problem, more likely I would guess it's some schedule update issue, particularly since I was able to see this changed the date long after A and B were performed.

Btw, I'm using WP-Crontrol plugin to check the scheduled tasks.

Change History (0)

Note: See TracTickets for help on using tickets.