From 9f04cc9d6c29b32f2e57bc867a34add61218511f Mon Sep 17 00:00:00 2001 From: Mzhelskiy Maxim Date: Wed, 23 Jul 2014 15:15:04 +0700 Subject: [PATCH] =?UTF-8?q?=D0=A6=D0=B5=D0=BD=D1=82=D1=80=D0=B0=D0=BB?= =?UTF-8?q?=D1=8C=D0=BD=D1=8B=D0=B9=20=D0=BA=D1=80=D0=BE=D0=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/utilities/cron/main.php | 31 +++++++++++++++++++++++++++++ framework | 2 +- install/patch.sql | 20 +++++++++++++++++++ 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 application/utilities/cron/main.php diff --git a/application/utilities/cron/main.php b/application/utilities/cron/main.php new file mode 100644 index 00000000..70a76398 --- /dev/null +++ b/application/utilities/cron/main.php @@ -0,0 +1,31 @@ +Cron_RunMain(); + } +} + +/** + * Создаем объект крон-процесса, + * передавая параметром путь к лок-файлу + */ +$app=new CronMain(Config::Get('sys.cache.dir').'CronMain.lock'); +print $app->Exec(); \ No newline at end of file diff --git a/framework b/framework index 61a0ae59..1faee8e7 160000 --- a/framework +++ b/framework @@ -1 +1 @@ -Subproject commit 61a0ae59ea437ebb0fc0de7ec675e348b16f2627 +Subproject commit 1faee8e713d28b6a3086984dfaf86a13be933c84 diff --git a/install/patch.sql b/install/patch.sql index 47e773bf..d4eeedae 100644 --- a/install/patch.sql +++ b/install/patch.sql @@ -608,3 +608,23 @@ NULL , 'blog', 'Блоги', '1', '2014-07-14 00:00:00', NULL , '' -- 22.07.2014 ALTER TABLE `prefix_topic` ADD `topic_date_edit_content` DATETIME NULL DEFAULT NULL AFTER `topic_date_edit` , ADD INDEX ( `topic_date_edit_content` ) ; + + +-- 23.07.2014 +CREATE TABLE IF NOT EXISTS `prefix_cron_task` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `title` varchar(500) NOT NULL, + `method` varchar(500) NOT NULL, + `plugin` varchar(50) NOT NULL, + `state` tinyint(1) NOT NULL DEFAULT '1', + `count_run` int(11) NOT NULL DEFAULT '0', + `period_run` int(11) NOT NULL, + `date_create` datetime NOT NULL, + `date_run_last` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `count_run` (`count_run`), + KEY `state` (`state`), + KEY `plugin` (`plugin`), + KEY `method` (`method`(255)), + KEY `period_run` (`period_run`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; \ No newline at end of file