PHP Класс Cron_Schedule_Command, wp-cli

## EXAMPLES # List available cron schedules $ wp cron schedule list +------------+-------------+----------+ | name | display | interval | +------------+-------------+----------+ | hourly | Once Hourly | 3600 | | twicedaily | Twice Daily | 43200 | | daily | Once Daily | 86400 | +------------+-------------+----------+
Наследование: extends WP_CLI_Command
Показать файл Открыть проект

Открытые методы

Метод Описание
list_ ( $args, $assoc_args ) List available cron schedules.

Защищенные методы

Метод Описание
format_schedule ( array $schedule, string $name ) : array Callback function to format a cron schedule.
get_schedules ( ) : array Return a list of the cron schedules sorted according to interval.
sort ( array $a, array $b ) Callback function to sort the cron schedule array by interval.

Приватные методы

Метод Описание
get_formatter ( &$assoc_args )

Описание методов

format_schedule() защищенный статический Метод

Callback function to format a cron schedule.
protected static format_schedule ( array $schedule, string $name ) : array
$schedule array The schedule.
$name string The schedule name.
Результат array The formatted schedule.

get_schedules() защищенный статический Метод

Return a list of the cron schedules sorted according to interval.
protected static get_schedules ( ) : array
Результат array The array of cron schedules. Each schedule is itself an array.

list_() публичный Метод

## OPTIONS [--fields=] : Limit the output to specific object fields. [--field=] : Prints the value of a single field for each schedule. [--format=] : Render output in a particular format. --- default: table options: - table - csv - ids - json - yaml --- ## AVAILABLE FIELDS These fields will be displayed by default for each cron schedule: * name * display * interval There are no additional fields. ## EXAMPLES # List available cron schedules $ wp cron schedule list +------------+-------------+----------+ | name | display | interval | +------------+-------------+----------+ | hourly | Once Hourly | 3600 | | twicedaily | Twice Daily | 43200 | | daily | Once Daily | 86400 | +------------+-------------+----------+ # List id of available cron schedule $ wp cron schedule list --fields=name --format=ids hourly twicedaily daily
public list_ ( $args, $assoc_args )

sort() защищенный статический Метод

Callback function to sort the cron schedule array by interval.
protected static sort ( array $a, array $b )
$a array
$b array