[wp-trac] [WordPress Trac] #31401: wp-cron.php header comments confused or confusing
WordPress Trac
noreply at wordpress.org
Fri Oct 28 16:24:02 UTC 2016
#31401: wp-cron.php header comments confused or confusing
------------------------------------+------------------------------
Reporter: gbell12 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Cron API | Version: 2.6
Severity: normal | Resolution:
Keywords: dev-feedback has-patch | Focuses: docs
------------------------------------+------------------------------
Changes (by stevenlinx):
* keywords: needs-patch dev-feedback => dev-feedback has-patch
Comment:
1.)
As discussed previously, there are two different needs here:
i) Ensuring WP Cron runs at a minimum of X number of times alongside the
visit-trigger method (as @gbell12 desired)
ii) Replacing WP Cron altogether
I think the comment header can be better by clarifying how the users can
perform each of these two.
2.)
@gbell12
quote:
..wp_cron in wp-includes/wp_cron.php
There is no `wp-includes/wp_cron.php`. It's `wp-includes/cron.php`.
quote:
Hmm - also spawn_cron in wp-includes/cron.php calls wp-cron.php. I'm a
unclear as to the division of labor between cron.wp and wp-cron.php....
This is basically what each does:
/wp-includes/cron.php => contains the entire WordPress Cron API and the
functions needed to schedule WP Cron tasks. This is more for internal
calling (e.g. by plugins).
/wp-cron.php => performs the actual action of looping through each of the
WP Cron tasks and executing them.
3.)
I've uploaded a patch.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31401#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list