• Модуль: seo
  • Путь к файлу: ~/bitrix/modules/seo/lib/Sitemap/Job.php
  • Класс: BitrixSeoSitemapJob
  • Вызов: Job::markToRegenerate
static function markToRegenerate(int $sitemapId): bool
{
	try
	{
		if ($sitemapId > 0)
		{
			$existsJob = self::findJob($sitemapId);
			if (!$existsJob)
			{
				self::addJob($sitemapId);
			}

			self::deleteAgent($sitemapId);

			return (bool)self::addAgent($sitemapId);
		}
	}
	catch (SystemException $e)
	{
		return false;
	}

	return false;
}