This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to schedule a jsp page to execute?  RSS feed

 
Dave Bosky
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a jsp page that checks for records that exceed a time limit and need it to run every 10 minutes. How can I schedule a jsp to execute at specific intervals? I assume I can create a windows scheduled task to execute a batch file but I'm not sure what to put in the batch file.
Thanks,
Dave
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure what you are doing in the jsp page but this is my 2 cents.
If you could get away with it, wouldn't it be easier to run a DTS Package in the database scheduled to run at "blank" intervals. That is if you are not doing things that SQL can not handle.
Eric
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Putting a heavy computation function directly in a JSP is VERY bad design. JSP are intended for formatting output.
Instead, put all this heavy computation in a separate class. Your application can have a single instance of this helper class, and if you make the class Runnable and give it a Thread, it can run on its own schedule, independent of any JSP.
Bill
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!