This page redirects to an external site: https://developer.wordpress.org/reference/functions/wp_clear_scheduled_hook/
Un-schedules all previously-scheduled cron jobs using a particular hook name or a specific combination of hook name and arguments.
<?php wp_clear_scheduled_hook( $hook, $args ); ?>
No value is returned by this function.
// If you previously added for example // wp_schedule_single_event( time() + 3600, 'my_new_event' ); wp_clear_scheduled_hook( 'my_new_event' ); // or this if you created something like // wp_schedule_single_event( time() + 3600, 'my_new_event', array( 'some_arg' ) ); wp_clear_scheduled_hook( 'my_new_event', array( 'some_arg' ) );
If you created a scheduled job using a hook and arguments you cannot delete it by supplying only the hook. Similarly if you created a set of scheduled jobs that share a hook but have different arguments you cannot delete them using only the hook name, you have to delete them all individually using the hook name and arguments.
Since: 2.1.0
wp_clear_scheduled_hook() is located in wp-includes/cron.php
Cron Functions: wp_schedule_event(), wp_schedule_single_event(), wp_clear_scheduled_hook(), wp_next_scheduled(), wp_unschedule_event(), wp_get_schedule()