Core Function
View Source on Trac ↗ wp_reschedule_event()
wp_reschedule_event(
mixed $timestamp,
mixed $recurrence,
mixed $hook,
mixed $args = array(),
mixed $wp_error = false
) Reschedules a recurring event.
Parameters 4 required
| Name / Type | Description |
|---|---|
| $timestamp int | Unix timestamp (UTC) for when the event was scheduled. Required |
| string | $recurrence How often the event should subsequently recur. See wp_get_schedules() for accepted values. Required |
| $hook string | Action hook to execute when the event is run. Required |
| array | $args Optional. Array containing arguments to pass to the hook's callback function. Each value in the array is passed to the callback as an individual parameter. The array keys are ignored. Default empty array. Required |
| $wp_error bool | Optional. Whether to return a WP_Error on failure. Default false. |
Return Value
((bool)
| WP_Error) True if event successfully rescheduled. False or WP_Error on failure.
Function Information
Since Version
2.1.0
Source File
wp-includes/cron.php
Advertisement