• Модуль: imopenlines
  • Путь к файлу: ~/bitrix/modules/imopenlines/lib/log/execlog.php
  • Класс: BitrixImOpenLinesLogExecLog
  • Вызов: ExecLog::isTimeToExec
static function isTimeToExec($execFunction, $execPeriod = 86400)
{
	$result = true;
	$exec = self::getExecByFunction($execFunction)->Fetch();

	if (!empty($exec['LAST_EXEC_TIME']))
	{
		$datetime = new DateTime($exec['LAST_EXEC_TIME']);
		$result = (time() - $datetime->getTimestamp() >= $execPeriod);
	}

	return $result;
}