• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/replicator/template/taskrepeater.php
  • Класс: BitrixTasksReplicatorTemplateTaskRepeater
  • Вызов: TaskRepeater::updateAgentPeriod
private function updateAgentPeriod(): void
{
	// we can not use CAgent::Update() here, kz the agent will be updated again just after this function ends ...
	global $pPERIOD;
	// ... but we may set some global var called $pPERIOD
	// "why ' - time()'?" you may ask. see CAgent::ExecuteAgents(), in the last sql we got:
	// NEXT_EXEC=DATE_ADD(".($arAgent["IS_PERIOD"]=="Y"? "NEXT_EXEC" : "now()").", INTERVAL ".$pPERIOD." SECOND),
	$pPERIOD = $this->nextExecutionTimeTS - time();
}