wp_get_scheduled_event

SummerySummery

Retrieve a scheduled event.

Syntax

wp_get_scheduled_event( string $hook, array $args = array(), int|null $timestamp = null )

DescriptionDescription

Retrieve the full event object for a given event, if no timestamp is specified the next scheduled event is returned.

ParametersParameters

$hook

(string) (Required) Action hook of the event.

$args

(array) (Optional) Array containing each separate argument to pass to the hook's callback function. Although not passed to a callback, these arguments are used to uniquely identify the event, so they should be the same as those used when originally scheduling the event.

Default value: array()

$timestamp

(int|null) (Optional) Unix timestamp (UTC) of the event. If not specified, the next scheduled event is returned.

Default value: null

ReturnReturn

(object|false) The event object. False if the event does not exist.

SourceSource

File: wp-includes/cron.php


			

ChangelogChangelog

Changelog
Version Description
5.1.0 Introduced.
Scroll to Top