[wp-trac] [WordPress Trac] #44818: cron: preventing duplicate events fails when the first event is too far in the past

WordPress Trac noreply at wordpress.org
Sat Mar 16 06:41:29 UTC 2019


#44818: cron: preventing duplicate events fails when the first event is too far in
the past
-------------------------------------------------+-------------------------
 Reporter:  bodohugobarwich                      |       Owner:
                                                 |  peterwilsoncc
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  5.2
Component:  Cron API                             |     Version:  2.7
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests needs-      |     Focuses:
  refresh 5-2-early                              |
-------------------------------------------------+-------------------------
Changes (by peterwilsoncc):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"44917" 44917]:
 {{{
 #!CommitTicketReference repository="" revision="44917"
 Cron: Ensure identical single events aren't scheduled less than 10min
 apart.

 Improves the logic in `wp_schedule_single_event()` to ensure an identical
 event is not scheduled within ten minutes.

 This moves the logic for checking for identical events to be self
 contained rather than relying on `wp_next_scheduled()` as this fails to
 account for events with a past timestamp when wp-cron fails to trigger or
 for multiple identical events being scheduled already.

 Props bodohugobarwich.
 Fixes #44818.
 }}}

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


More information about the wp-trac mailing list