WC_Action_Queue::schedule_cron()publicWC 1.0

Schedule an action that recurs on a cron-like schedule.

Method of the class: WC_Action_Queue{}

No Hooks.

Return

String. The action ID

Usage

$WC_Action_Queue = new WC_Action_Queue();
$WC_Action_Queue->schedule_cron( $timestamp, $cron_schedule, $hook, $args, $group );
$timestamp(int) (required)
The schedule will start on or after this time.
$cron_schedule(string) (required)
A cron-link schedule string.
$hook(string) (required)
The hook to trigger.
$args(array)
Arguments to pass when the hook triggers.
Default: array()
$group(string)
The group to assign this job to.
Default: ''

Notes

  • See: http://en.wikipedia.org/wiki/Cron

    ┬ ┬ ┬ ┬ ┬ ┬
    | | | | | |
    | | | | | + year [optional]
    | | | | +----- day of week (0 - 7) (Sunday=0 or 7)
    | | | +---------- month (1 - 12)
    | | +--------------- day of month (1 - 31)
    | +-------------------- hour (0 - 23)
    +------------------------- min (0 - 59)

WC_Action_Queue::schedule_cron() code WC 8.7.0

public function schedule_cron( $timestamp, $cron_schedule, $hook, $args = array(), $group = '' ) {
	return as_schedule_cron_action( $timestamp, $cron_schedule, $hook, $args, $group );
}