tags:

views:

16

answers:

3

I know some about Struts2. But it's all about something begins with "user click(HTTPRequest)".

I need to know how to run some method(it seems not to be a proper term) inside. Example, everyday or every hour update some list.

I mean, without any request from the outside. I guess it has something to do with the socalled back-end or whatever.

A: 

Since there's so much left unspecified, I'll assume much: cron.

Nathon
A: 

Depending on what language you're working with, and what platform your app is running on, you can create a web service(or a script) that contains your method.

Then, On your server(or any computer), use Windows task scheduler (or Cron if on Linux). Select Internet Explorer (iexplore.exe) and pass it the web address were your method lives. You can then set the task to repeat on whatever interval you wish.

I have a couple scheduling applications that interface to 3rd party systems. I use this method to initiate my calls at specified times to the 3rd party vendors.

cinqoTimo
+1  A: 

Your Web Service implementation is running is a server somewhere. Possibly it's a JEE application server? Server environments can offer scheduling capabilities so that the service call is made according to time or calendar events.

See for example websphere's task scheduler or librararies such as Quartz

djna