You can do it either way. Database or application level.
At the database level , you can write a stored procedure that executes
automatically at a scheduled time.
Most RDBMS have a scheduling functionality.
At the application level you can write a class or a servlet and execute it at a
scheduled interval. On the MS platform you can use NT Scheduled tasks , on a
UNIX environment you can use a cron job to execute the class or servlet.
I think it would be easier to do it at the database level because if you do it
at the application level you will finally be interacting with the database. By
doing it in the database you remove an added layer.Another advantage at the DB
level is security , you can associate a restricted user account to execute the
procedure, no one else can execute that without privileges.
Santosh
Shuja <[EMAIL PROTECTED]> on 08/29/2001 01:45:58 PM
Please respond to A mailing list about Java Server Pages specification and
reference <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
cc: (bcc: Santosh Daryani/IT/Aon Consulting)
Subject: How to write a scheduler????
Hi,
I want to write a scheduler to delete certain records from the database
after a certain time e.g. the expired listings should be removed.
Should I use it on database level or application servers do support
features like this. Any suggestion ? Thank you in anticipation.
From:
Shuja Nawaz.
Software Developer.
Visualsoft-inc.com.
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets