Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to run JSP or Servlets in background?

 
Steven Ho
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I am trying to develope a web application using JSP or Servlets that will
1. read all email inside email account.(done in JSP)
2. summarize the total of emails, put in database (done in JSP).
Currently the administrator have to open the JSP files, click a button and
only then the process will start to put the total of emails inside database.
But I need to make these processes automated, like once every week, without administrator or anyone. How do I do that? Is using JSP and Servlets suitable for accomplishing the task above? Please help
Thanks in Advance!!!
[ September 04, 2003: Message edited by: Steven Ho ]
[ September 04, 2003: Message edited by: Steven Ho ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64700
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Doing this in the context of JSPs and servlets doesn't make a whole lot of sense. I'd write a daemon app that either runs all the time and wakes up when it's time to do something, or that's executed as a cron job on the server at scheduled times.
hth,
bear
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The daemon could of course run as a container-lifecycle servlet which launches a single thread that once a week performs its task.
The same servlet could then also provide a means to perform administration on itself (say, set the interval or other parameters) through a web interface.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic