code: public function generateFeedsByArchive($intId)
  	{
  		$objFeed = NewsFeedModel::findByArchive($intId);
  
  		if ($objFeed !== null)
  		{
  			while ($objFeed->next())
  			{
  				$objFeed->feedName = $objFeed->alias ?: 'news' . $objFeed->id;
  
  				// Update the XML file
  				$this->generateFiles($objFeed->row());
  				$this->log('Generated news feed "' . $objFeed->feedName . '.xml"', __METHOD__, TL_CRON);
  			}
  		}
  	}
docs: Generate all feeds including a certain archive
  #
  @param integer $intId