0

What I want to do is check in a regular fashion (30 seconds/every minute) if a certain value on a webpage has changed (by parsing) and then be notified by e-mail. Is there an existing service out there which I can use or is there an easy way I can do that programmatically with a script or Java program?

I looked at different tools like PubSubHubbub and other examples here on SO but didn't find something appropriate.

Do you have any ideas? Thanks

MMascarin
  • 468
  • 4
  • 6

1 Answers1

1

Well, for the polling, you can use cron4j: http://www.sauronsoftware.it/projects/cron4j/.

cron4j is a scheduler for the Java platform which is very similar to the UNIX cron daemon. With cron4j you can launch, from within your Java applications, any task you need at the right time, according to some simple rules.

To parse the value in the webpage, I don't think there's a better way of doing it than Jsoup: http://jsoup.org/

Using Jsoup you can access the DOM elements of the webpage very much like you would on jquery.

pedrop
  • 134
  • 1
  • 7
  • Some good libs to take a look at, thanks! Will also try the mail sending with the help of [this](http://stackoverflow.com/questions/3649014/send-email-using-java) – MMascarin Dec 11 '14 at 23:04
  • I tried out jsoup and it works really well, thanks again for the advice – MMascarin Dec 13 '14 at 11:45