#19431 closed defect (bug) (invalid)

wp_next_scheduled reruns start time, not next time

Reported by: maccast Owned by:
Priority: normal Milestone:
Component: Cron Version: 3.2.1
Severity: normal Keywords: close
Cc:

Description

When I call wp_next_scheduled() instead of getting the timestamp plus the recurrance interval, the function appears to just return the timestamp. The timestamp is the value set by the wp_schedule_event() method and is the UNIX timestamp of when the event was scheduled. Since wp_next_scheduled() is supposed to: "Returns the next timestamp for a cron event." shouldn't return the timestamp + recurrence interval value?

Change History (3)

wp_schedule_event()'s $timestamp is when you want to run the event. So if you want to run it in five minutes, you'd do time() + 300.

Thus, the $timestamp returned by wp_next_scheduled() would be whatever time() + 300 was equal to at the time of scheduling.

  • Keywords close added
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.