Notify_GetTasksDelayed(Config::Get('module.notify.per_process')); if(empty($aNotifyTasks)) { $this->Log("No tasks are found."); return; } /** * Последовательно загружаем задания на публикацию */ $aArrayId=array(); foreach ($aNotifyTasks as $oTask) { $this->Notify_SendTask($oTask); $aArrayId[]=$oTask->getTaskId(); } $this->Log("Send notify: ".count($aArrayId)); /** * Удаляем отработанные задания */ $this->Notify_DeleteTaskByArrayId($aArrayId); } } $sLockFilePath=Config::Get('sys.cache.dir').'CronNotify.lock'; /** * Создаем объект крон-процесса, * передавая параметром путь к лок-файлу */ $app=new CronNotify($sLockFilePath); print $app->Exec();