Codex

Function Reference/wp clear scheduled hook

Contents

Description

Un-schedules all previously-scheduled cron jobs using a particular hook name.

Usage

 <?php wp_clear_scheduled_hook'my_schedule_hook' ); ?> 

Examples

Clear a scheduled event


// 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' ) );

Parameters

$hook
(string) (required) The name of an action hook to execute.
Default: None
$args
(array) (optional) Arguments to pass to the hook function(s)
Default: None

See:

See also index of Function Reference and index of Template Tags.
This page is marked as incomplete. You can help Codex by expanding it.