[wp-trac] [WordPress Trac] #44597: Scheduling posts adds wrong seconds as post_date

WordPress Trac noreply at wordpress.org
Tue Aug 25 17:06:30 UTC 2020


#44597: Scheduling posts adds wrong seconds as post_date
--------------------------+------------------------------
 Reporter:  katsar0v      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Date/Time     |     Version:  4.9.7
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by lukasbesch):

 I've noticed this on a (high traffic) site running WooCommerce and
 disabled `WP_CRON`, running a real cronjob every minute. The new products
 were released a minute later than estimated.

 I see these options to resolve the issue:

 1. Provide an `input` field for seconds.
    This has to be implemented on several locations:
    - Meta box on post edit screen (Classic Editor)
    - Meta box on post edit screen (Gutenberg)
    - Quick edit on post list screen
    - Bulk edit on post list screen

 2. Set the seconds to `00` when scheduling a post.

 @markparnell You mentioned the value for the seconds should be random.
 If I understand it correctly, the reason is that if you are using regular
 `WP_CRON`, the load impact of publishing a large number of scheduled posts
 would be distributed on multiple requests rather than only the first after
 second zero.
 If this is the case, we could check if `WP_CRON` is enabled before setting
 it to the current time (or even a random value), else set it to zero.

 From an editors perspective, I think the seconds input would make more
 sense as it allows finer control of time-critical content.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44597#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list