The schedule_event filter is fired when a new event is added to the cron schedule. It sends one parameter: the event being scheduled.
<?php function filter_handler( $event ){ ...... }
add_filter( 'schedule_event' , 'filter_handler' , '10', 1 ); ?>
The following example of using this hook eliminates all checks for plugins
<?php
function filter_cron_events($event) {
switch ($event->hook) {
case 'wp_version_check':
case 'wp_update_plugins':
case 'wp_update_themes':
case 'wp_update_themes':
$event = false;
break;
}
return $event;
}
add_filter( 'schedule_event', 'filter_cron_events', '10', 1);
?>
In WordPress 3.21, the following recurring events are scheduled by the core: wp_version_check, wp_update_plugins, wp_update_themes, wp_schedule_delete, and (for the main site of multisite installs only) wp_update_network_counts.
In WordPress 3.21, the following single events are scheduled on demand by the core: publish_future_post, do_pings, importer_scheduled_cleanup.
schedule_event is located in wp-includes/cron.php
.
(wp_insert_post) Since: 2.1.0