• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/replicator/template/taskrepeater.php
  • Класс: BitrixTasksReplicatorTemplateTaskRepeater
  • Вызов: TaskRepeater::writeToLogLoopError
private function writeToLogLoopError(string $nextExecutionTime, string $lastExecutionTime, int $iterationCount): void
{
	$template = $this->repository->getTemplate();
	if ($iterationCount > static::MAX_ITERATION_COUNT)
	{
		$message = 'insane iteration count reached while calculating next execution time';
	}
	else
	{
		$createdBy = $template['CREATED_BY'];

		$eDebug = [
			$createdBy,
			time(),
			User::getTimeZoneOffsetCurrentUser(),
			User::getTimeZoneOffset($createdBy),
			$this->replicateParameter->get('TIME'),
			$this->replicateParameter->get('TIMEZONE_OFFSET'),
			$iterationCount,
		];
		$message = 'getTemplateNextExecutionTime() loop detected for replication by template '
			. $template->getId()
			. ' ('
			. $nextExecutionTime
			. ' => '
			. $lastExecutionTime
			. ') ('
			. implode(', ', $eDebug)
			. ')';
	}

	(new Log())->collect($message);
}