cron_reschedule_event_error
Action HookDescription
Fires if an error happens when rescheduling a cron event.Hook Information
File Location |
wp-cron.php
View on GitHub
|
Hook Type | Action |
Line Number | 152 |
Hook Parameters
Type | Name | Description |
---|---|---|
WP_Error
|
$result
|
The WP_Error object. |
string
|
$hook
|
Action hook to execute when the event is run. |
array
|
$v
|
Event data. |
Usage Examples
Basic Usage
<?php
// Hook into cron_reschedule_event_error
add_action('cron_reschedule_event_error', 'my_custom_function', 10, 3);
function my_custom_function($result, $hook, $v) {
// Your custom code here
}
Source Code Context
wp-cron.php:152
- How this hook is used in WordPress core
<?php
147 *
148 * @param WP_Error $result The WP_Error object.
149 * @param string $hook Action hook to execute when the event is run.
150 * @param array $v Event data.
151 */
152 do_action( 'cron_reschedule_event_error', $result, $hook, $v );
153 }
154 }
155
156 $result = wp_unschedule_event( $timestamp, $hook, $v['args'], true );
157
PHP Documentation
<?php
/**
* Fires if an error happens when rescheduling a cron event.
*
* @since 6.1.0
*
* @param WP_Error $result The WP_Error object.
* @param string $hook Action hook to execute when the event is run.
* @param array $v Event data.
*/
Quick Info
- Hook Type: Action
- Parameters: 3
- File: wp-cron.php
Related Hooks
Related hooks will be displayed here in future updates.