Store time of last cron run

This commit is contained in:
Dmitriy Simushev 2013-05-07 12:43:18 +00:00
parent 663c9119e6
commit ba2ede20aa
2 changed files with 12 additions and 2 deletions

View File

@ -38,9 +38,12 @@ calculate_thread_statistics();
calculate_operator_statistics();
calculate_page_statistics();
// Trigger cron event
$dispatcher = EventDispatcher::getInstance();
$dispatcher->triggerEvent('cronRun');
// Update time of last cron run
Settings::set('_last_cron_run', time());
Settings::update();
?>

View File

@ -103,7 +103,14 @@ Class Settings {
'invitation_lifetime' => 60, /* Lifetime for invitation to chat */
'tracking_lifetime' => 600, /* Time to store tracked old visitors' data */
'cron_key' => $default_cron_key
'cron_key' => $default_cron_key,
// System values are listed below. They cannot be changed via
// administrative interface. Start names for these values from
// underscore sign(_).
// Unix timestamp when cron job ran last time.
'_last_cron_run' => 0
);
// Load values from database