diff --git a/src/messenger/webim/cron.php b/src/messenger/webim/cron.php index 35832333..b714b0ac 100644 --- a/src/messenger/webim/cron.php +++ b/src/messenger/webim/cron.php @@ -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(); + ?> \ No newline at end of file diff --git a/src/messenger/webim/libs/classes/settings.php b/src/messenger/webim/libs/classes/settings.php index 1d7a632d..d72613fa 100644 --- a/src/messenger/webim/libs/classes/settings.php +++ b/src/messenger/webim/libs/classes/settings.php @@ -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