Re: newbie question: the steps of a making a ping service
From: Raymond DeCampo (rdecampo_at_spam.twcny.spam.rr.spam.com.spam)
Date: 07/25/04
- Next message: Alexander N. Spitzer: "RMI binding to SAME port but DIFFERENT IP address on SAME host"
- Previous message: Raymond DeCampo: "Re: Reflection"
- In reply to: lawrence: "newbie question: the steps of a making a ping service"
- Next in thread: lawrence: "Re: newbie question: the steps of a making a ping service"
- Reply: lawrence: "Re: newbie question: the steps of a making a ping service"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 24 Jul 2004 22:22:15 GMT
lawrence wrote:
> I want to store a list of web addresses in a flat file, and then, once
> a week, have an application open that flat file, read the addresses
> into an array, then loop though that array and open the pages. The
> point of this service is mostly to call certain PHP scripts that are
> in certain web pages. I could do this as a shell script called by
> cron, but I think doing this in Java would be more portable, and I
> need to use this service from several servers.
>
> So I'm asking what are the steps involved in making this script?
>
> I need an application that runs forever on the server.
>
> It needs a timer to call it once a week.
Personally, I would defer this part to cron (Unix) or Scheduled Tasks
(Windows). If you are determined to do it in Java, look at
java.util.Timer or roll your own using Thread.sleep().
>
> It need to open a flat file.
Look at the java.io package.
>
> It needs to read a list into an array.
This is straight-forward. You may want to consider using a java.util.List.
>
> It needs to loop through that array.
>
> It needs to attempt to open the pages at the addresses in that array.
Look at java.net.URL.
>
> I've nearly no experiences with Java, so whatever advice you can give
> a beginner, I'm grateful.
I assume you have some experience in other languages. If so, this
should make a good first project for Java.
HTH,
Ray
-- XML is the programmer's duct tape.
- Next message: Alexander N. Spitzer: "RMI binding to SAME port but DIFFERENT IP address on SAME host"
- Previous message: Raymond DeCampo: "Re: Reflection"
- In reply to: lawrence: "newbie question: the steps of a making a ping service"
- Next in thread: lawrence: "Re: newbie question: the steps of a making a ping service"
- Reply: lawrence: "Re: newbie question: the steps of a making a ping service"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|