admin管理员组

文章数量:1124775

I was taking a look at the inner workings of the Cron System, and found something odd: apparently, you can set a callback to event recurrence schedules. However, I can't find any documentation on that topic. The only indication I've found of what this is used for comes from _wp_cron's dockbloc: Runs scheduled callbacks or spawns cron for all scheduled events. Is that used anywhere by WordPress core? Is that a left over from the early days of WordPress? Is that meant for public usage?

For reference, take a look at line 1022 in wp-includes/cron.php:

if ( isset( $schedules[ $hook ]['callback'] )
        && ! call_user_func( $schedules[ $hook ]['callback'] )
) {
        continue;
}

Here $schedules is the return value of wp_get_schedules.

本文标签: wp cronWhat are scheduled callbacks