Advertisements

wp_get_schedule

Definition:
function wp_get_schedule($hook, $args = array() {}

Retrieve Cron schedule for hook with arguments.

Parameters

  • string $hook: Action hook to execute when cron is run.
  • array $args: Optional. Arguments to pass to the hook’s callback function.

Return values

returns:False, if no schedule. Schedule on success.

Source code

function wp_get_schedule($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 $cron[$hook][$key]['schedule'];

	}

	return false;

}

3745

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: