@Override
	public void run()
	{
		// Setup the calendar
		Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("GMT-0"), Locale.UK);
		
		// Create a date format
		SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HHmm z");
		
		// Set the log filename
		String fileName = "Frequency.txt";
		
		// Setup the log file
		File logFile = new File(logFolder.getAbsolutePath() + File.separator + fileName);
		
		// Set the URL to the National Grid data web page
		URL url = null;
		
		try
		{
			url = new URL("http://www.bmreports.com/bsp/additional/saveoutput.php?element=rollingfrequencyhistoric&output=XML");
		}
		catch(MalformedURLException e)
		{
			e.printStackTrace();
		}
		
		while(enabled)
		{
			URLConnection connection;
			long connectionDate;
			
			try
			{				
				// Open connection to the URL
				connection = url.openConnection(proxy);
				
				// Log the server's reported GPS date
				connectionDate = connection.getDate() / 1000L - TimeUtilities.GPS_UNIX_EPOCH_OFFSET;
				
				// Parse the data
				parseFrequencies(connection.getInputStream());
			}
			catch (IOException e)
			{
				e.printStackTrace();
			}
			catch (SAXException e)
			{
				e.printStackTrace();
			}
			catch (ParserConfigurationException e)
			{
				e.printStackTrace();
			}
			
			try
			{
				Thread.sleep(updateFrequency);
			}
			catch(InterruptedException e)
			{
				e.printStackTrace();
			}
		}
	}