\Horde_Scheduler

Horde_Scheduler

Summary

Methods
Properties
Constants
factory()
__construct()
run()
serialize()
unserialize()
sleep()
No public properties found
No constants found
No protected methods found
$_sleep
$_sleep_adj
N/A
No private methods found
No private properties found
N/A

Properties

$_sleep

$_sleep : string

Name of the sleep function.

Type

string

$_sleep_adj

$_sleep_adj : integer

Adjustment factor to sleep in microseconds.

Type

integer

Methods

factory()

factory(string  $driver, array  $params = null) : \Horde_Scheduler

Attempts to return a concrete Horde_Scheduler instance based on $driver.

Parameters

string $driver

The type of concrete subclass to return.

array $params

A hash containing any additional configuration or connection parameters a subclass might need.

Throws

\Horde_Scheduler_Exception

Returns

\Horde_Scheduler

The newly created concrete instance.

__construct()

__construct() 

Constructor.

Figures out how we can best sleep with microsecond precision based on what platform we're running on.

run()

run() 

Main loop/action function.

serialize()

serialize(string  $id = '') : boolean

Preserve the internal state of the scheduler object that we are passed, and save it to the Horde VFS backend. Horde_Scheduler objects should define __sleep() and __wakeup() serialization callbacks for anything that needs to be done at object serialization or deserialization - handling database connections, etc.

Parameters

string $id

An id to uniquely identify this scheduler from others of the same class.

Returns

boolean —

Success result.

unserialize()

unserialize(string  $class, string  $id = '', boolean  $autosave = true) 

Restore a Horde_Scheduler object from the cache.

Parameters

string $class

The name of the object to restore.

string $id

An id to uniquely identify this scheduler from others of the same class.

boolean $autosave

Automatically store (serialize) the returned object at script shutdown.

sleep()

sleep(integer  $msec) 

Platform-independant sleep $msec microseconds.

Parameters

integer $msec

Microseconds to sleep.