[wp-trac] [WordPress Trac] #63987: wp_get_scheduled_event() incorrectly returns false for cron events scheduled with a timestamp of 0.

WordPress Trac noreply at wordpress.org
Sat Mar 14 14:28:29 UTC 2026


#63987: wp_get_scheduled_event() incorrectly returns false for cron events
scheduled with a timestamp of 0.
-------------------------------------------------+-------------------------
 Reporter:  codekraft                            |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  7.0
Component:  Cron API                             |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests has-test-   |     Focuses:
  info 2nd-opinion                               |
-------------------------------------------------+-------------------------

Comment (by wildworks):

 I don't see the current behavior as a bug, so I suggest closing this
 ticket.

 There are two reasons for this.

 - Events with a zero timestamp cannot be registered using public
 functions. They can only be registered using `_get_cron_array` and
 `_set_cron_array`, which are marked as private. I don't think registering
 cron events in that way is intended.
 - Cron events are meant to be registered for future dates, not for current
 or past dates.

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


More information about the wp-trac mailing list