Hello everyone,
Can any of you help me schedule this to run daily at some hour? Thanks...
import java.net.*;
import java.io.*;
public class URLReader {
public static String outFile = "C://test//Test.txt";
public static void main(String[] args) throws Exception {
URL oracle = new URL("http://www.oracle.com/");
URLConnection yc = oracle.openConnection();
BufferedReader in = new BufferedReader(new InputStreamReader(
yc.getInputStream()));
String inputLine;
BufferedWriter psout = new BufferedWriter(new FileWriter(outFile));
while ((inputLine = in.readLine()) != null) {
psout.write(inputLine);
System.out.println(inputLine);
}
in.close();
psout.close();
}
}