[wp-trac] [WordPress Trac] #20537: Don't spawn cron requests for suspended blogs

WordPress Trac noreply at wordpress.org
Tue Feb 2 03:09:09 UTC 2021


#20537: Don't spawn cron requests for suspended blogs
--------------------------+-------------------------
 Reporter:  ryan          |       Owner:  jeremyfelt
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  5.7
Component:  Cron API      |     Version:  3.3.1
 Severity:  normal        |  Resolution:  fixed
 Keywords:                |     Focuses:  multisite
--------------------------+-------------------------
Changes (by peterwilsoncc):

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


Comment:

 In [changeset:"50135" 50135]:
 {{{
 #!CommitTicketReference repository="" revision="50135"
 Cron API: Run alternative wp-cron later, do not run on archived blogs.

 Runs cron jobs later on sites using alternative cron, ie the
 `ALTERNATE_WP_CRON` constant is true, to more closely match when standard
 cron jobs are run. Jobs now run on the `wp_loaded` hook at priority `20`.
 Prior to this change they would run on the `init` hook. This ensures
 custom post types and taxonomies are registered prior to the jobs running.

 This change also prevents alternative wp-cron from running on archived or
 suspended multisite blogs as these are shut down prior to the `wp_loaded`
 hook from running.

 Moves the existing functionality of `wp_cron()` in to a new private
 function `_wp_cron()`.

 Props flixos90, jeremyfelt, johnbillion, jrf, kurtpayne, nacin,
 peterwilsoncc, prettyboymp, r-a-y, ryan, stevenkword, swissspidy.
 Fixes #20537, #24160.
 }}}

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


More information about the wp-trac mailing list