public static function handleRunOnce()
	{
		try
		{
			$files = System::getContainer()->get('contao.resource_locator')->locate('config/runonce.php', null, false);
		}
		catch (\InvalidArgumentException $e)
		{
			return;
		}

		foreach ($files as $file)
		{
			try
			{
				include $file;
			}
			catch (\Exception $e) {}

			$strRelpath = StringUtil::stripRootDir($file);

			if (!unlink($file))
			{
				throw new \Exception("The file $strRelpath cannot be deleted. Please remove the file manually and correct the file permission settings on your server.");
			}

			System::log("File $strRelpath ran once and has then been removed successfully", __METHOD__, TL_GENERAL);
		}
	}
public static function handleRunOnce()
	{
		try
		{
			$files = System::getContainer()->get('contao.resource_locator')->locate('config/runonce.php', null, false);
		}
		catch (\InvalidArgumentException $e)
		{
			return;
		}

		foreach ($files as $file)
		{
			try
			{
				include $file;
			}
			catch (\Exception $e) {}

			$strRelpath = StringUtil::stripRootDir($file);

			if (!unlink($file))
			{
				throw new \Exception("The file $strRelpath cannot be deleted. Please remove the file manually and correct the file permission settings on your server.");
			}

			System::log("File $strRelpath ran once and has then been removed successfully", __METHOD__, TL_GENERAL);
		}
	}
public static function handleRunOnce ( ) { try { $ files = System :: getContainer ( ) -> get ( 'contao.resource_locator' ) -> locate ( 'config/runonce.php' , null , false ) ; } catch ( \ InvalidArgumentException $ e ) { return ; } foreach ( $ files as $ file ) { try { include $ file ; } catch ( \ Exception $ e ) { } $ strRelpath = StringUtil :: stripRootDir ( $ file ) ; if ( ! unlink ( $ file ) ) { throw new \ Exception ( "The file $strRelpath cannot be deleted. Please remove the file manually and correct the file permission settings on your server." ) ; } System :: log ( "File $strRelpath ran once and has then been removed successfully" , __METHOD__ , TL_GENERAL ) ; } }
Handle "runonce" files

@throws \Exception
Handle runonce files