wp_cron [ WordPress Function ]
wp_cron ( No parameters )
| Returns: |
|
| Defined at: |
|
Run scheduled callbacks or spawn cron for all scheduled events.
Source
<?php
function wp_cron() {
// Prevent infinite loops caused by lack of wp-cron.php
if ( strpos($_SERVER['REQUEST_URI'], '/wp-cron.php') !== false || ( defined('DISABLE_WP_CRON') && DISABLE_WP_CRON ) )
return;
if ( false === $crons = _get_cron_array() )
return;
$local_time = microtime( true );
$keys = array_keys( $crons );
if ( isset($keys[0]) && $keys[0] > $local_time )
return;
$schedules = wp_get_schedules();
foreach ( $crons as $timestamp => $cronhooks ) {
if ( $timestamp > $local_time ) break;
foreach ( (array) $cronhooks as $hook => $args ) {
if ( isset($schedules[$hook]['callback']) && !call_user_func( $schedules[$hook]['callback'] ) )
continue;
spawn_cron( $local_time );
break 2;
}
}
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- Function Reference/wp cron « WordPress Codex
Description. Run scheduled callbacks or spawn cron for all scheduled events. Usage. <?php wp_cron() ?> Parameters. None. Return Values. (null): When ...
codex.wordpress.org - WordPress › Support » Tags — wp_cron
Password (forgot?) Register · WordPress › Support » wp_cron ...
wordpress.org - WordPress Excessive Overloading Your Server The wp_cron.php ...
Nov 28, 2010 ... Have you received the dreaded suspension notice for excessive resource usage, or notices of excessive resource usage for your WordPress ...
www.johnoverall.com - Scheduling WordPress Hooks With WP_Cron
Jul 15, 2009 ... If you do much in the way of WordPress plugin development, whether you're doing plugins, themes, or just customizing your own sites, you may ...
www.webmaster-source.com
Kullanýcý Tartýþmalarý [ wordpress.org ]
- BREAKDOWNCORE on "[Plugin: Better WP Security] Default Setting?"
- Joost de Valk on "[Plugin: WordPress SEO by Yoast] Issue with Sitemaps and real CRON"
- pixgeeks on "[Plugin: WordPress SEO by Yoast] Issue with Sitemaps and real CRON"
- tommix on "WP_CRON doesn't work"
- Jan Dembowski on "WP_CRON doesn't work"
- tommix on "WP_CRON doesn't work"
- Jan Dembowski on "WP_CRON doesn't work"
- tommix on "WP_CRON doesn't work"
- tommix on "WP_CRON doesn't work"
- esmi on "WP_CRON doesn't work"