KWeb  6.4
Cron Class Reference

Public Member Functions

 prepare ()
 addTask ($taskOrId, $callback=null, $params=null, $interval=null)
 Adds CRON task as a callback function.
 getTask ($id)
 getTaskList ()
 Returns all task ids.
 getInterval ()
 run ($taskId=false)

Static Public Member Functions

static instance ($create=true)
static cacheUrls ($dir, $urls)

Data Fields

 $tasks = null

Static Public Attributes

static $inst = null

Protected Member Functions

 __construct ()

Constructor & Destructor Documentation

Cron::__construct ( ) [protected]

Member Function Documentation

Cron::addTask ( taskOrId,
callback = null,
params = null,
interval = null 
)

Adds CRON task as a callback function.

Parameters:
$idUnique task id
$funcCallable function (string, or array)
array$paramsArray of parameters to pass to the function
$intervalNumber of seconds between task runs, or string in the format understandable by strtotime() (eg. "+1 day 18:00" will run task again after one day, at 6pm.)
static Cron::cacheUrls ( dir,
urls 
) [static]
Cron::getInterval ( )
Cron::getTask ( id)
Returns:
Cron_Task
Cron::getTaskList ( )

Returns all task ids.

static Cron::instance ( create = true) [static]
Returns:
Cron
Cron::prepare ( )
Cron::run ( taskId = false)

Field Documentation

Cron::$inst = null [static]
Cron::$tasks = null

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