wp_next_scheduled( string $hook, array $args = array() )

Retrieve the next timestamp for an event.


Parameters

$hook

(Required) Action hook to execute when event is run.

$args

(Optional) Arguments to pass to the hook's callback function.

Default value: array()


Return

(false|int) The Unix timestamp of the next time the scheduled event will occur.


Source

File: wp-includes/cron.php

function wp_next_scheduled( $hook, $args = array() ) {
	$crons = _get_cron_array();
	$key = md5(serialize($args));
	if ( empty($crons) )
		return false;
	foreach ( $crons as $timestamp => $cron ) {
		if ( isset( $cron[$hook][$key] ) )
			return $timestamp;
	}
	return false;
}


Changelog

Changelog
Version Description
WP-2.1.0 Introduced.