[wp-trac] [WordPress Trac] #21072: CRON often returns ambiguous values

WordPress Trac noreply at wordpress.org
Tue May 1 02:04:27 UTC 2018


#21072: CRON often returns ambiguous values
---------------------------------------------+----------------------------
 Reporter:  evansolomon                      |       Owner:  peterwilsoncc
     Type:  enhancement                      |      Status:  closed
 Priority:  normal                           |   Milestone:  5.0
Component:  Cron API                         |     Version:
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests commit  |     Focuses:
---------------------------------------------+----------------------------
Changes (by peterwilsoncc):

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


Comment:

 In [changeset:"43050" 43050]:
 {{{
 #!CommitTicketReference repository="" revision="43050"
 Cron API: Return meaningful values from cron functions.

 Return values added to Cron API functions to indicate outcome:

 * `wp_schedule_single_event()`, `wp_schedule_event()`,
 `wp_reschedule_event()` and `wp_unschedule_event()`: boolean indicating
 success or failure,
 * `wp_clear_scheduled_hook()`: integer indicating number of jobs cleared
 (zero or more), `false` if one or more jobs fail to clear,
 * `wp_unschedule_hook()`: integer indicating number of jobs cleared (zero
 or more), `false` if the jobs fail to clear,
 * `spawn_cron()`: boolean indicating whether job spawned,
 * `wp_cron()`: integer indicating number of jobs spawned (zero or more),
 `false` if one or more jobs fail to spawned,
 * `_set_cron_array()`: boolean outcome of `update_option()`.

 Props evansolomon, jrf, peterwilsoncc, pento for code review.
 Fixes #21072.
 }}}

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


More information about the wp-trac mailing list