On this page
apply_filters( 'schedule_event', stdClass|false $event )
Modify an event before it is scheduled.
Parameters
$eventstdClass|false-
An object containing an event's data, or boolean false to prevent the event from being scheduled.
hookstringAction hook to execute when the event is run.timestampintUnix timestamp (UTC) for when to next run the event.schedulestring|falseHow often the event should subsequently recur.argsarrayArray containing each separate argument to pass to the hook's callback function.intervalintThe interval time in seconds for the schedule. Only present for recurring events.
More Information
- The hook is applied when a new event is added to the cron schedule. The hook passes through one parameter: the
$eventbeing scheduled. - 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.
Source
File: wp-includes/cron.php. View all references
$event = apply_filters( 'schedule_event', $event );
Related
Used By
| Used By | Description |
|---|---|
| wp_schedule_event() wp-includes/cron.php | Schedules a recurring event. |
| wp_schedule_single_event() wp-includes/cron.php | Schedules an event to run only once. |
Changelog
| Version | Description |
|---|---|
| 3.1.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/schedule_event