views:

37

answers:

2

Hi, i had a look on the struts plugins list here and wasn't able to find a plugin to do background/scheduled tasks.

What i want to do, is run a daily task that pulls files from a few servers. I'd like this task to be run from within the web app, so that my importer gets access to all the data classes, also it would be less complicated IMO.

Any common way to go about this?

Thanks

+3  A: 

Your best bet is probably Quartz which provides a way to define jobs, and a number of triggers, including cron like expressions. It can be embedded in your app.

jayshao
Looks pretty good...
Chris
Did that answer your question? While you can do some similar things with Timer objects (http://download.oracle.com/docs/cd/E17476_01/javase/1.4.2/docs/api/java/util/Timer.html) Quartz is well documented, and more feature rich
jayshao
Just still reading their docs... looks like it'll fit the bill nicely - thanks for the recommendation!
Chris
+1  A: 

Together with Struts2 I use the Spring Plugin for this Issue.

With Spring you can easy define Timer Tasks or Quartz Jobs to execute Background Jobs.

jogep