abstract class SystemCron

Class Cron

Properties

string[] $messages
string $module_name
protected Controller[] $mod_registry
protected int $last_execution

When was this cron last executed/finished

protected int $last_start

When was this cron last started

protected $init_state
protected int $error_count

Current Error Count

Methods

check_for_existing_instances()

Checks if instances are available and set init state to abort (no process() call) if not

int
getErrorCount()

No description

int
getLastExecution()

Return last execution timestamp

bool|Controller[]
load_module_instances(string $module)

No description

message($str, $logLevel = LOG_INFO)

Cron Status Information Messages Will be writte to LOG our used as output when executed via web administration

process($cron_id)

No description

reschedule_cron(string $cron_id, int $schedule_for = null)

This will re-run the cron, optionally with a given scheduled time

void
setErrorCount(int $error_count)

No description

set_last_times(int $last_start, int $last_execution)

Set Last Times

bool
start_cron(string $cron_id)

No description

Details

at line 77
check_for_existing_instances()

Checks if instances are available and set init state to abort (no process() call) if not

at line 164
int getErrorCount()

No description

Return Value

int

at line 179
int getLastExecution()

Return last execution timestamp

Return Value

int

at line 59
bool|Controller[] load_module_instances(string $module)

No description

Parameters

string $module

Module name

Return Value

bool|Controller[]

at line 123
message($str, $logLevel = LOG_INFO)

Cron Status Information Messages Will be writte to LOG our used as output when executed via web administration

Parameters

$str
$logLevel

at line 148
abstract process($cron_id)

No description

Parameters

$cron_id

at line 110
reschedule_cron(string $cron_id, int $schedule_for = null)

This will re-run the cron, optionally with a given scheduled time

Parameters

string $cron_id

Cron ID (e.g. wall_as_email)

int $schedule_for

Timestamp when the cron should be run again, defaults to now

Exceptions

Exception

at line 171
void setErrorCount(int $error_count)

No description

Parameters

int $error_count

Return Value

void

at line 156
set_last_times(int $last_start, int $last_execution)

Set Last Times

Parameters

int $last_start

Unix-Timestamp

int $last_execution

Unix-Timestamp

at line 92
bool start_cron(string $cron_id)

No description

Parameters

string $cron_id

Return Value

bool

Returns true of the process was successfull (no cron to run or a successfull cronjob) and false if a cron has been started but quit with an error