diff --git a/src/messenger/webim/cron.php b/src/messenger/webim/cron.php
new file mode 100644
index 00000000..eb0942bb
--- /dev/null
+++ b/src/messenger/webim/cron.php
@@ -0,0 +1,31 @@
+<?php
+/*
+ * Copyright 2005-2013 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+require_once('libs/init.php');
+
+$cron_key = empty($_GET['cron_key']) ? '' : $_GET['cron_key'];
+
+// Check cron security key
+if ($cron_key != Settings::get('cron_key')) {
+	die();
+}
+
+// Trigger cron event
+$dispatcher = EventDispatcher::getInstance();
+$dispatcher->triggerEvent('cronRun');
+
+?>
\ 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 32eb0a30..1d7a632d 100644
--- a/src/messenger/webim/libs/classes/settings.php
+++ b/src/messenger/webim/libs/classes/settings.php
@@ -52,9 +52,11 @@ Class Settings {
 	/**
 	 * Settings class constructor. Set default values and load setting from database.
 	 * @global $home_locale Specifies home locale. Defined in libs/config.php
+	 * @global $default_cron_key Default value for cron security key. Defined
+	 * in libs/common/constants.php
 	 */
 	protected function __construct() {
-		global $home_locale;
+		global $home_locale, $default_cron_key;
 		// Set default values
 		$this->settings = array(
 			'dbversion' => 0,
@@ -100,6 +102,8 @@ Class Settings {
 			'visitors_limit' => 20, /* Number of visitors to look over */
 			'invitation_lifetime' => 60, /* Lifetime for invitation to chat */
 			'tracking_lifetime' => 600, /* Time to store tracked old visitors' data */
+
+			'cron_key' => $default_cron_key
 		);
 
 		// Load values from database
diff --git a/src/messenger/webim/libs/common/constants.php b/src/messenger/webim/libs/common/constants.php
index 284482ba..1531b71f 100644
--- a/src/messenger/webim/libs/common/constants.php
+++ b/src/messenger/webim/libs/common/constants.php
@@ -36,6 +36,15 @@ $featuresversion = '1.6.4';
  */
 $session_prefix = md5($mysqlhost.'##'.$mysqldb.'##'.$mysqlprefix) . '_';
 
+/**
+ * Default value for cron security key.
+ * Another value can be set at operator/settings.php page.
+ */
+$default_cron_key = md5(
+	$mysqlhost . '##' . $mysqldb . '##' . $mysqllogin. '##' .
+	$mysqlpass . '##' . $mysqlprefix . '##'
+);
+
 /**
  * Name for cookie to track visitor
  */
diff --git a/src/messenger/webim/locales/en/properties b/src/messenger/webim/locales/en/properties
index bce42121..8c7300f8 100644
--- a/src/messenger/webim/locales/en/properties
+++ b/src/messenger/webim/locales/en/properties
@@ -487,6 +487,8 @@ settings.chatstyle.description=A preview all pages for each style is available <
 settings.chatstyle=Select a style for your chat windows
 settings.company.title.description=Enter your company title
 settings.company.title=Company title
+settings.cronkey=Cron security key
+settings.cronkey.description=To run cron use link <a href="{0}">{0}</a>.
 settings.email.description=Enter an email to receive system messages
 settings.email=Email
 settings.enableban.description=Using it you can block attacks from specific IPs
@@ -555,6 +557,7 @@ settings.usernamepattern.description=How to build visitor's identifying string f
 settings.usernamepattern=Visitor's identifier
 settings.visitorslimit.description=Specify the number of items to display in tracked visitors list. Default is 20. Set 0 for all visitors (not recommended).
 settings.visitorslimit=Limit for tracked visitors list
+settings.wrong.cronkey=Use only Latin letters(upper and lower case) and numbers in cron key.
 settings.wrong.email=Enter a valid email address
 settings.wrong.onehostconnections="Max number of threads" field should be a number
 settings.wrong.threadlifetime="Thread lifetime" field should be a number
diff --git a/src/messenger/webim/locales/ru/properties b/src/messenger/webim/locales/ru/properties
index 72b8f9f1..0c3c39df 100644
--- a/src/messenger/webim/locales/ru/properties
+++ b/src/messenger/webim/locales/ru/properties
@@ -486,6 +486,8 @@ settings.chatstyle.description=
 settings.chatstyle=�������� ��� ������ ��� ����
 settings.company.title.description=������� �������� ����� ��������
 settings.company.title=�������� ��������
+settings.cronkey=���� ������������ cron
+settings.cronkey.description=��� ������� cron ����������� ������ <a href="{0}">{0}</a>.
 settings.email.description=������� ����� ����������� ����� ��� ��������� ��������� �� �������
 settings.email=����� ����������� �����
 settings.enableban.description=� �� ������� ����� ����������� ����� � ������������ �������
@@ -557,6 +559,7 @@ settings.usernamepattern.description=
 settings.usernamepattern=������������ ��� ����������
 settings.visitorslimit.description=������� ���������� ��������� � ������ ������������� ����������� �����. �� ���������, 20. ������� 0 ��� ������ ����������� (�� �������������).
 settings.visitorslimit=����������� �� ����� ��������� � ������ ������������� �����������
+settings.wrong.cronkey=����������� ������ ��������� �����(�������� � ������� ��������) � ����� � ����� ������������ cron.
 settings.wrong.email=������� ���������� ����� ����������� �����
 settings.wrong.onehostconnections=���� "������������ ���������� ��������" ������ ���� ������
 settings.wrong.threadlifetime=���� "����� ����� �������" ������ ���� ������
diff --git a/src/messenger/webim/operator/settings.php b/src/messenger/webim/operator/settings.php
index 9281c4a7..4b2761e6 100644
--- a/src/messenger/webim/operator/settings.php
+++ b/src/messenger/webim/operator/settings.php
@@ -31,7 +31,8 @@ $stylelist = get_style_list("../styles/dialogs");
 
 $options = array(
 	'email', 'title', 'logo', 'hosturl', 'usernamepattern',
-	'chatstyle', 'chattitle', 'geolink', 'geolinkparams', 'sendmessagekey');
+	'chatstyle', 'chattitle', 'geolink', 'geolinkparams',
+	'sendmessagekey', 'cron_key');
 
 if (Settings::get('enabletracking')) {
 	$options[] = 'invitationstyle';
@@ -53,6 +54,7 @@ if (isset($_POST['email']) && isset($_POST['title']) && isset($_POST['logo'])) {
 	$params['geolink'] = getparam('geolink');
 	$params['geolinkparams'] = getparam('geolinkparams');
 	$params['sendmessagekey'] = verifyparam('sendmessagekey', "/^c?enter$/");
+	$params['cron_key'] = getparam('cronkey');
 
 	$params['chatstyle'] = verifyparam("chatstyle", "/^\w+$/", $params['chatstyle']);
 	if (!in_array($params['chatstyle'], $stylelist)) {
@@ -78,6 +80,10 @@ if (isset($_POST['email']) && isset($_POST['title']) && isset($_POST['logo'])) {
 		}
 	}
 
+	if (preg_match("/^[0-9A-z]*$/", $params['cron_key']) == 0) {
+		$errors[] = getlocal("settings.wrong.cronkey");
+	}
+
 	if (count($errors) == 0) {
 		foreach ($options as $opt) {
 			Settings::set($opt,$params[$opt]);
@@ -101,6 +107,15 @@ $page['formsendmessagekey'] = $params['sendmessagekey'];
 $page['availableChatStyles'] = $stylelist;
 $page['stored'] = isset($_GET['stored']);
 $page['enabletracking'] = Settings::get('enabletracking');
+$page['formcronkey'] = $params['cron_key'];
+
+$page['cron_path'] = (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off')
+	? 'http://'
+	: 'https://';
+$page['cron_path'] .= $_SERVER['SERVER_NAME'] . $webimroot . '/cron.php';
+$page['cron_path'] .= empty($params['cron_key'])
+	? ''
+	: '?cron_key='.$params['cron_key'];
 
 if (Settings::get('enabletracking')) {
 	$page['forminvitationstyle'] = $params['invitationstyle'];
diff --git a/src/messenger/webim/view/settings.php b/src/messenger/webim/view/settings.php
index fbefd0a9..da0e44b1 100644
--- a/src/messenger/webim/view/settings.php
+++ b/src/messenger/webim/view/settings.php
@@ -113,6 +113,15 @@ require_once('inc_errors.php');
 			<br clear="all"/>
 		</div>
 
+		<div class="field">
+			<div class="flabel"><?php echo getlocal('settings.cronkey') ?></div>
+			<div class="fvalue">
+				<input type="text" name="cronkey" size="40" value="<?php echo form_value('cronkey') ?>" class="formauth"/>
+			</div>
+			<div class="fdescr"> &mdash; <?php echo getlocal2('settings.cronkey.description', array($page['cron_path'])) ?></div>
+			<br clear="all"/>
+		</div>
+
 		<div class="field">
 			<div class="flabel"><?php echo getlocal('settings.chatstyle') ?></div>
 			<div class="fvalue">