<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>https://wiki.umisoft.ru/index.php?action=history&amp;feed=atom&amp;title=CSV_%D0%B8%D0%BC%D0%BF%D0%BE%D1%80%D1%82_%D0%BF%D0%BE_%D0%BA%D1%80%D0%BE%D0%BD%D1%83</id>
	<title>CSV импорт по крону - История изменений</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.umisoft.ru/index.php?action=history&amp;feed=atom&amp;title=CSV_%D0%B8%D0%BC%D0%BF%D0%BE%D1%80%D1%82_%D0%BF%D0%BE_%D0%BA%D1%80%D0%BE%D0%BD%D1%83"/>
	<link rel="alternate" type="text/html" href="https://wiki.umisoft.ru/index.php?title=CSV_%D0%B8%D0%BC%D0%BF%D0%BE%D1%80%D1%82_%D0%BF%D0%BE_%D0%BA%D1%80%D0%BE%D0%BD%D1%83&amp;action=history"/>
	<updated>2026-05-16T07:17:54Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://wiki.umisoft.ru/index.php?title=CSV_%D0%B8%D0%BC%D0%BF%D0%BE%D1%80%D1%82_%D0%BF%D0%BE_%D0%BA%D1%80%D0%BE%D0%BD%D1%83&amp;diff=8680&amp;oldid=prev</id>
		<title>Whoa в 08:39, 20 августа 2018</title>
		<link rel="alternate" type="text/html" href="https://wiki.umisoft.ru/index.php?title=CSV_%D0%B8%D0%BC%D0%BF%D0%BE%D1%80%D1%82_%D0%BF%D0%BE_%D0%BA%D1%80%D0%BE%D0%BD%D1%83&amp;diff=8680&amp;oldid=prev"/>
		<updated>2018-08-20T08:39:33Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Версия 08:39, 20 августа 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l101&quot; &gt;Строка 101:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 101:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Теперь осталось &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;только &lt;/del&gt;настроить автоматический запуск cron &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;на какое-то время, это вы самостоятельно устанавливаете &lt;/del&gt;на хостинге, информацию о cron в нашей документации &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;вы можете &lt;/del&gt;посмотреть здесь: http://dev.docs.umi-cms.ru/nastrojka_sistemy/cron/ .&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Теперь осталось настроить автоматический запуск cron на хостинге, информацию о cron в нашей документации &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;можно &lt;/ins&gt;посмотреть здесь: http://dev.docs.umi-cms.ru/nastrojka_sistemy/cron/ .&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; [[category:Модуль Обмен данными]][[Категория:Написание кастомных макросов]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; [[category:Модуль Обмен данными]][[Категория:Написание кастомных макросов]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Whoa</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.umisoft.ru/index.php?title=CSV_%D0%B8%D0%BC%D0%BF%D0%BE%D1%80%D1%82_%D0%BF%D0%BE_%D0%BA%D1%80%D0%BE%D0%BD%D1%83&amp;diff=8679&amp;oldid=prev</id>
		<title>Whoa в 08:38, 20 августа 2018</title>
		<link rel="alternate" type="text/html" href="https://wiki.umisoft.ru/index.php?title=CSV_%D0%B8%D0%BC%D0%BF%D0%BE%D1%80%D1%82_%D0%BF%D0%BE_%D0%BA%D1%80%D0%BE%D0%BD%D1%83&amp;diff=8679&amp;oldid=prev"/>
		<updated>2018-08-20T08:38:52Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Версия 08:38, 20 августа 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Строка 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039; Актуально для версии 18.&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039; Актуально для версии 18.&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Для того чтобы настроить CSV импорт по расписанию необходим модуль &amp;quot;Обмен данными&amp;quot; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;и следующий код:&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Для того&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, &lt;/ins&gt;чтобы настроить CSV импорт по расписанию&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, &lt;/ins&gt;необходим модуль &amp;quot;Обмен данными&amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Создадим файл custom_events.php в папке /components/exchange и добавим в него следующий код:&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Создадим файл custom_events.php в папке /components/exchange и добавим в него следующий код:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Whoa</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.umisoft.ru/index.php?title=CSV_%D0%B8%D0%BC%D0%BF%D0%BE%D1%80%D1%82_%D0%BF%D0%BE_%D0%BA%D1%80%D0%BE%D0%BD%D1%83&amp;diff=8678&amp;oldid=prev</id>
		<title>Whoa в 08:38, 20 августа 2018</title>
		<link rel="alternate" type="text/html" href="https://wiki.umisoft.ru/index.php?title=CSV_%D0%B8%D0%BC%D0%BF%D0%BE%D1%80%D1%82_%D0%BF%D0%BE_%D0%BA%D1%80%D0%BE%D0%BD%D1%83&amp;diff=8678&amp;oldid=prev"/>
		<updated>2018-08-20T08:38:29Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Версия 08:38, 20 августа 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Строка 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039; Актуально 18 &amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039; Актуально &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;для версии &lt;/ins&gt;18&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;.&lt;/ins&gt;&amp;#039;&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Для того чтобы настроить CSV импорт по расписанию необходим модуль &amp;quot;Обмен данными&amp;quot; и следующий код:&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Для того чтобы настроить CSV импорт по расписанию необходим модуль &amp;quot;Обмен данными&amp;quot; и следующий код:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Whoa</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.umisoft.ru/index.php?title=CSV_%D0%B8%D0%BC%D0%BF%D0%BE%D1%80%D1%82_%D0%BF%D0%BE_%D0%BA%D1%80%D0%BE%D0%BD%D1%83&amp;diff=8675&amp;oldid=prev</id>
		<title>Kublan в 09:47, 19 августа 2018</title>
		<link rel="alternate" type="text/html" href="https://wiki.umisoft.ru/index.php?title=CSV_%D0%B8%D0%BC%D0%BF%D0%BE%D1%80%D1%82_%D0%BF%D0%BE_%D0%BA%D1%80%D0%BE%D0%BD%D1%83&amp;diff=8675&amp;oldid=prev"/>
		<updated>2018-08-19T09:47:20Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Версия 09:47, 19 августа 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l24&quot; &gt;Строка 24:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Строка 24:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		public function onCronCsvUpdate(iUmiEventPoint $event) {&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		public function onCronCsvUpdate(iUmiEventPoint $event) {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;			$id = 38853;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;			$id = 38853; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;// идентификатор выгрузки&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;			$umiObjects = umiObjectsCollection::getInstance();&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;			$umiObjects = umiObjectsCollection::getInstance();&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Kublan</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.umisoft.ru/index.php?title=CSV_%D0%B8%D0%BC%D0%BF%D0%BE%D1%80%D1%82_%D0%BF%D0%BE_%D0%BA%D1%80%D0%BE%D0%BD%D1%83&amp;diff=8672&amp;oldid=prev</id>
		<title>Kublan: Новая страница: «&#039;&#039;&#039; Актуально 18 &#039;&#039;&#039;  Для того чтобы настроить CSV импорт по расписанию необходим модуль &quot;Обме…»</title>
		<link rel="alternate" type="text/html" href="https://wiki.umisoft.ru/index.php?title=CSV_%D0%B8%D0%BC%D0%BF%D0%BE%D1%80%D1%82_%D0%BF%D0%BE_%D0%BA%D1%80%D0%BE%D0%BD%D1%83&amp;diff=8672&amp;oldid=prev"/>
		<updated>2018-08-19T07:57:15Z</updated>

		<summary type="html">&lt;p&gt;Новая страница: «&amp;#039;&amp;#039;&amp;#039; Актуально 18 &amp;#039;&amp;#039;&amp;#039;  Для того чтобы настроить CSV импорт по расписанию необходим модуль &amp;quot;Обме…»&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039; Актуально 18 &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Для того чтобы настроить CSV импорт по расписанию необходим модуль &amp;quot;Обмен данными&amp;quot; и следующий код:&lt;br /&gt;
&lt;br /&gt;
Создадим файл custom_events.php в папке /components/exchange и добавим в него следующий код:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;#039;php&amp;#039;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
    new umiEventListener(&amp;#039;cron&amp;#039;, &amp;#039;exchange&amp;#039;, &amp;#039;onCronCsvUpdate&amp;#039;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
В файл customMacros.php добавим обработчик события:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;#039;php&amp;#039;&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
	use UmiCms\Service;&lt;br /&gt;
&lt;br /&gt;
	/** Класс пользовательских макросов */&lt;br /&gt;
	class ExchangeCustomMacros {&lt;br /&gt;
		/** @var exchange $module */&lt;br /&gt;
		public $module;&lt;br /&gt;
&lt;br /&gt;
		public function onCronCsvUpdate(iUmiEventPoint $event) {&lt;br /&gt;
			$id = 38853;&lt;br /&gt;
			$umiObjects = umiObjectsCollection::getInstance();&lt;br /&gt;
&lt;br /&gt;
			$settings = $umiObjects-&amp;gt;getObject($id);&lt;br /&gt;
&lt;br /&gt;
			if (!$settings instanceof iUmiObject) {&lt;br /&gt;
				throw new publicException(getLabel(&amp;#039;exchange-err-settings_notfound&amp;#039;));&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			$importFile = $settings-&amp;gt;getValue(&amp;#039;file&amp;#039;);&lt;br /&gt;
			if (!($importFile instanceof umiFile) || $importFile-&amp;gt;getIsBroken()) {&lt;br /&gt;
				throw new publicException(getLabel(&amp;#039;exchange-err-importfile&amp;#039;));&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			$format_id = $settings-&amp;gt;getValue(&amp;#039;format&amp;#039;);&lt;br /&gt;
			$importFormat = $umiObjects-&amp;gt;getObject($format_id);&lt;br /&gt;
			if (!$importFormat instanceof iUmiObject) {&lt;br /&gt;
				throw new publicException(getLabel(&amp;#039;exchange-err-format_undefined&amp;#039;));&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			$suffix = $importFormat-&amp;gt;getValue(&amp;#039;sid&amp;#039;);&lt;br /&gt;
			$session = Service::Session();&lt;br /&gt;
			$importOffset = (int) $session-&amp;gt;get(&amp;#039;import_offset_&amp;#039; . $id);&lt;br /&gt;
			$umiConfig = mainConfiguration::getInstance();&lt;br /&gt;
			$blockSize = $umiConfig-&amp;gt;get(&amp;#039;modules&amp;#039;, &amp;#039;exchange.splitter.limit&amp;#039;) ?: 25;&lt;br /&gt;
&lt;br /&gt;
			$splitter = umiImportSplitter::get($suffix);&lt;br /&gt;
			if ($splitter instanceof csvSplitter) {&lt;br /&gt;
				$this-&amp;gt;setCsvEncoding($splitter, $settings);&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			$splitter-&amp;gt;load($importFile-&amp;gt;getFilePath(), $blockSize, $importOffset);&lt;br /&gt;
			$doc = $splitter-&amp;gt;getDocument();&lt;br /&gt;
			$dump = $splitter-&amp;gt;translate($doc);&lt;br /&gt;
&lt;br /&gt;
			umiHierarchy::$ignoreSiteMap = true;&lt;br /&gt;
&lt;br /&gt;
			$importer = new xmlImporter();&lt;br /&gt;
			$importer-&amp;gt;loadXmlString($dump);&lt;br /&gt;
&lt;br /&gt;
			$elements = $settings-&amp;gt;getValue(&amp;#039;elements&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
			if (is_array($elements) &amp;amp;&amp;amp; umiCount($elements)) {&lt;br /&gt;
				$importer-&amp;gt;setDestinationElement($elements[0]);&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			$importer-&amp;gt;setIgnoreParentGroups($splitter-&amp;gt;ignoreParentGroups);&lt;br /&gt;
			$importer-&amp;gt;setAutoGuideCreation($splitter-&amp;gt;autoGuideCreation);&lt;br /&gt;
			$importer-&amp;gt;setRenameFiles($splitter-&amp;gt;getRenameFiles());&lt;br /&gt;
&lt;br /&gt;
			$importer-&amp;gt;execute();&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		public function setCsvEncoding(csvSplitter $splitter, iUmiObject $settings) {&lt;br /&gt;
			$scenarioEncodingId = $settings-&amp;gt;getValue(&amp;#039;encoding_import&amp;#039;);&lt;br /&gt;
			$scenarioEncodingCode = &amp;#039;&amp;#039;;&lt;br /&gt;
			$scenarioEncoding = umiObjectsCollection::getInstance()&lt;br /&gt;
				-&amp;gt;getObject($scenarioEncodingId);&lt;br /&gt;
&lt;br /&gt;
			if ($scenarioEncoding instanceof iUmiObject) {&lt;br /&gt;
				$scenarioEncodingCode = $scenarioEncoding-&amp;gt;getName();&lt;br /&gt;
			}&lt;br /&gt;
&lt;br /&gt;
			$configEncoding = mainConfiguration::getInstance()&lt;br /&gt;
				-&amp;gt;get(&amp;#039;system&amp;#039;, &amp;#039;default-exchange-encoding&amp;#039;);&lt;br /&gt;
			$defaultEncoding = &amp;#039;windows-1251&amp;#039;;&lt;br /&gt;
			$encoding = $scenarioEncodingCode ?: $configEncoding;&lt;br /&gt;
&lt;br /&gt;
			try {&lt;br /&gt;
				$splitter-&amp;gt;setEncoding($encoding);&lt;br /&gt;
			} catch (InvalidArgumentException $e) {&lt;br /&gt;
				$splitter-&amp;gt;setEncoding($defaultEncoding);&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Теперь осталось только настроить автоматический запуск cron на какое-то время, это вы самостоятельно устанавливаете на хостинге, информацию о cron в нашей документации вы можете посмотреть здесь: http://dev.docs.umi-cms.ru/nastrojka_sistemy/cron/ .&lt;br /&gt;
 [[category:Модуль Обмен данными]][[Категория:Написание кастомных макросов]]&lt;/div&gt;</summary>
		<author><name>Kublan</name></author>
		
	</entry>
</feed>