Class CronTab

Description

Static class to build and read cron entries

Located in /system/classes/crontab.php (line 9)

ActionHandler
   |
   --CronTab
Method Summary
static void add_cron (array $paramarray)
static void add_daily_cron (string $name, mixed $callback, [string $description = ''])
static void add_hourly_cron (string $name, mixed $callback, [string $description = ''])
static void add_monthly_cron (string $name, mixed $callback, [string $description = ''])
static void add_single_cron (string $name, mixed $callback, HabariDateTime $run_time, [string $description = ''])
static void add_weekly_cron (string $name, mixed $callback, [string $description = ''])
static bool delete_cronjob (string $name)
static CronJob get_cronjob (string $name)
static void run_cron ([boolean $async = false])
void act_poll_cron ()
Variables
Methods
static method add_cron (line 136)

Add a new cron job to the DB.

static void add_cron (array $paramarray)
  • array $paramarray: A paramarray of cron job feilds.
static method add_daily_cron (line 194)

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

static void add_daily_cron (string $name, mixed $callback, [string $description = ''])
  • 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.
static method add_hourly_cron (line 176)

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

static void add_hourly_cron (string $name, mixed $callback, [string $description = ''])
  • 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.
static method add_monthly_cron (line 230)

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

static void add_monthly_cron (string $name, mixed $callback, [string $description = ''])
  • 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.
static method add_single_cron (line 157)

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

static void add_single_cron (string $name, mixed $callback, HabariDateTime $run_time, [string $description = ''])
  • 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.
static method add_weekly_cron (line 212)

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

static void add_weekly_cron (string $name, mixed $callback, [string $description = ''])
  • 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.
static method delete_cronjob (line 121)

Delete a Cron Job by name from the Database.

  • return: Wheather or not the delete was successfull
static bool delete_cronjob (string $name)
  • string $name: The name of the cron job to delete.
static method get_cronjob (line 109)

Get a Cron Job by name from the Database.

  • return: The cron job retreived from the DB
static CronJob get_cronjob (string $name)
  • string $name: The name of the cron job to retreive.
static method run_cron (line 16)

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

static void run_cron ([boolean $async = false])
  • boolean $async: If true, allows execution to continue by making an asynchronous request to a cron URL
act_poll_cron (line 74)

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..
void act_poll_cron ()

Inherited Methods

Inherited From ActionHandler

ActionHandler::act()
ActionHandler::act_redirect()
ActionHandler::__call()

Documentation generated on Thu, 30 Oct 2008 20:31:07 +0100 by phpDocumentor 1.3.2