开发者

How some method(service? whatever..) can be run by certain conditions or by certain period of time

开发者 https://www.devze.com 2023-01-19 23:52 出处:网络
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

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开发者_JAVA技巧 it has something to do with the socalled back-end or whatever.


Your Web Service implementation is running is a server somewhere. Possibly it's a Java EE 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


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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消