WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#37455 closed defect (bug) (fixed)

DocBlock of wp_schedule_single_event() should mention 10 minute lock

Reported by: medariox Owned by: SergeyBiryukov
Milestone: 4.6 Priority: normal
Severity: normal Version: 2.7
Component: Cron API Keywords: has-patch
Focuses: docs Cc:

Description

The codex has this note

Note that scheduling an event to occur before 10 minutes after an existing event of the same name will be ignored, unless you pass unique values for $args to each scheduled event. See wp_next_scheduled() for more information.

(https://codex.wordpress.org/Function_Reference/wp_schedule_single_event)

This should be added to the DocBlock so it's also available on https://developer.wordpress.org/reference/functions/wp_schedule_single_event/.

Attachments (1)

37455.patch (693 bytes) - added by medariox 4 years ago.

Download all attachments as: .zip

Change History (6)

@medariox
4 years ago

#1 @medariox
4 years ago

  • Keywords has-patch added

#2 @swissspidy
4 years ago

  • Version changed from trunk to 2.7

Introduced in [9181], altered in [29939].

Re: the patch, See wp_next_scheduled() for more information. should probably be added as @see wp_next_scheduled(). "before 10 minutes after an existing event of the same name" sound weird. What about something along the lines of "within 10 minutes of an existing event", like in the inline comment below?

#3 @SergeyBiryukov
4 years ago

wp_next_scheduled() does not really provide any additional information, so I'd probably skip that bit.

#4 @SergeyBiryukov
4 years ago

  • Milestone changed from Awaiting Review to 4.6

#5 @SergeyBiryukov
4 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 38148:

Docs: In wp_schedule_single_event(), add a note about scheduling an event to occur within 10 minutes of another event with the same action hook.

Props medariox.
Fixes #37455.

Note: See TracTickets for help on using tickets.