PHP Класс Habari\CronTab

Показать файл Открыть проект Примеры использования класса

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

Метод Описание
add_cron ( array $paramarray ) : CronJob Add a new cron job to the DB.
add_daily_cron ( string $name, mixed $callback, string $description = '' ) : CronJob Add a new cron job to the DB, that runs daily.
add_hourly_cron ( string $name, mixed $callback, string $description = '' ) : CronJob Add a new cron job to the DB, that runs hourly.
add_monthly_cron ( string $name, mixed $callback, string $description = '' ) : CronJob Add a new cron job to the DB, that runs monthly.
add_single_cron ( string $name, mixed $callback, DateTime $run_time, string $description = '' ) : CronJob Add a new cron job to the DB, that runs only once.
add_weekly_cron ( string $name, mixed $callback, string $description = '' ) : CronJob Add a new cron job to the DB, that runs weekly.
delete_cronjob ( mixed $name ) : boolean Delete a Cron Job by name or id from the Database.
get_cronjob ( mixed $name ) : CronJob Get a Cron Job by name or id from the Database.

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

add_cron() статический публичный Метод

Add a new cron job to the DB.
См. также: CronJob
static public add_cron ( array $paramarray ) : CronJob
$paramarray array A paramarray of cron job feilds.
Результат CronJob

add_daily_cron() статический публичный Метод

Add a new cron job to the DB, that runs daily.
static public add_daily_cron ( string $name, mixed $callback, string $description = '' ) : CronJob
$name string The name of the cron job.
$callback mixed The callback function or plugin action for the cron job to execute.
$description string The description of the cron job.
Результат CronJob

add_hourly_cron() статический публичный Метод

Add a new cron job to the DB, that runs hourly.
static public add_hourly_cron ( string $name, mixed $callback, string $description = '' ) : CronJob
$name string The name of the cron job.
$callback mixed The callback function or plugin action for the cron job to execute.
$description string The description of the cron job.
Результат CronJob

add_monthly_cron() статический публичный Метод

Add a new cron job to the DB, that runs monthly.
static public add_monthly_cron ( string $name, mixed $callback, string $description = '' ) : CronJob
$name string The name of the cron job.
$callback mixed The callback function or plugin action for the cron job to execute.
$description string The description of the cron job.
Результат CronJob

add_single_cron() статический публичный Метод

Add a new cron job to the DB, that runs only once.
static public add_single_cron ( string $name, mixed $callback, DateTime $run_time, string $description = '' ) : CronJob
$name string The name of the cron job.
$callback mixed The callback function or plugin action for the cron job to execute.
$run_time DateTime The time to execute the cron.
$description string The description of the cron job.
Результат CronJob

add_weekly_cron() статический публичный Метод

Add a new cron job to the DB, that runs weekly.
static public add_weekly_cron ( string $name, mixed $callback, string $description = '' ) : CronJob
$name string The name of the cron job.
$callback mixed The callback function or plugin action for the cron job to execute.
$description string The description of the cron job.
Результат CronJob

delete_cronjob() статический публичный Метод

Delete a Cron Job by name or id from the Database.
static public delete_cronjob ( mixed $name ) : boolean
$name mixed The name or id of the cron job to delete.
Результат boolean Wheather or not the delete was successfull

get_cronjob() статический публичный Метод

Get a Cron Job by name or id from the Database.
static public get_cronjob ( mixed $name ) : CronJob
$name mixed The name or id of the cron job to retreive.
Результат CronJob The cron job retreived from the DB