Public Member Functions | Static Public Member Functions

CronTab Class Reference

Inheritance diagram for CronTab:
Collaboration diagram for CronTab:

List of all members.

Public Member Functions

 act_poll_cron ()

Static Public Member Functions

static run_cron ($async=false)
static get_cronjob ($name)
static delete_cronjob ($name)
static add_cron ($paramarray)
static add_single_cron ($name, $callback, $run_time, $description= '')
static add_hourly_cron ($name, $callback, $description= '')
static add_daily_cron ($name, $callback, $description= '')
static add_weekly_cron ($name, $callback, $description= '')
static add_monthly_cron ($name, $callback, $description= '')

Detailed Description

Static class to build and read cron entries

Definition at line 11 of file crontab.php.


Member Function Documentation

CronTab::act_poll_cron (  ) 

Handles asyncronous cron calls.

Todo:
next_cron should be the actual next run time and update it when new crons are added instead of just maxing out at one day..

Definition at line 88 of file crontab.php.

static CronTab::add_cron ( paramarray  )  [static]

Add a new cron job to the DB.

See also:
CronJob
Parameters:
array $paramarray A paramarray of cron job feilds.

Definition at line 158 of file crontab.php.

Referenced by add_daily_cron(), add_hourly_cron(), add_monthly_cron(), add_single_cron(), and add_weekly_cron().

static CronTab::add_daily_cron ( name,
callback,
description = '' 
) [static]

Add a new cron job to the DB, that runs daily.

Parameters:
string $name The name of the cron job.
mixed $callback The callback function or plugin action for the cron job to execute.
string $description The description of the cron job.

Definition at line 216 of file crontab.php.

static CronTab::add_hourly_cron ( name,
callback,
description = '' 
) [static]

Add a new cron job to the DB, that runs hourly.

Parameters:
string $name The name of the cron job.
mixed $callback The callback function or plugin action for the cron job to execute.
string $description The description of the cron job.

Definition at line 198 of file crontab.php.

static CronTab::add_monthly_cron ( name,
callback,
description = '' 
) [static]

Add a new cron job to the DB, that runs monthly.

Parameters:
string $name The name of the cron job.
mixed $callback The callback function or plugin action for the cron job to execute.
string $description The description of the cron job.

Definition at line 252 of file crontab.php.

static CronTab::add_single_cron ( name,
callback,
run_time,
description = '' 
) [static]

Add a new cron job to the DB, that runs only once.

Parameters:
string $name The name of the cron job.
mixed $callback The callback function or plugin action for the cron job to execute.
HabariDateTime $run_time The time to execute the cron.
string $description The description of the cron job.

Definition at line 179 of file crontab.php.

Referenced by Update::check_plugins(), and Posts::update_scheduled_posts_cronjob().

static CronTab::add_weekly_cron ( name,
callback,
description = '' 
) [static]

Add a new cron job to the DB, that runs weekly.

Parameters:
string $name The name of the cron job.
mixed $callback The callback function or plugin action for the cron job to execute.
string $description The description of the cron job.

Definition at line 234 of file crontab.php.

static CronTab::delete_cronjob ( name  )  [static]

Delete a Cron Job by name or id from the Database.

Parameters:
mixed $name The name or id of the cron job to delete.
Returns:
bool Wheather or not the delete was successfull

Definition at line 143 of file crontab.php.

Referenced by Posts::update_scheduled_posts_cronjob().

static CronTab::get_cronjob ( name  )  [static]

Get a Cron Job by name or id from the Database.

Parameters:
mixed $name The name or id of the cron job to retreive.
Returns:
CronJob The cron job retreived from the DB

Definition at line 126 of file crontab.php.

Referenced by delete_cronjob().

static CronTab::run_cron ( async = false  )  [static]

Executes all cron jobs in the DB if there are any to run.

Parameters:
boolean $async If true, allows execution to continue by making an asynchronous request to a cron URL

Definition at line 18 of file crontab.php.


The documentation for this class was generated from the following file: