I want to run database cleaner whenever. I call for it or better make it run after every 10-15mins. but the problem is that I want it to run on a separate thread so that it doesn't affect other operations.
I am using servlets to process the client request.
I want the database cleaned(i.e delete expired rows-one of the column contains the expiry time) after, like I said, every 15 mins. I am using jboss server and postgresql.
How can this be done?
Asked
Active
Viewed 258 times
0

Ashwin
- 12,691
- 31
- 118
- 190
-
2Check this: http://stackoverflow.com/questions/2248971/running-periodic-task-at-server-side-for-servlet-jsp-mvc-website There are a number of different ways to implement schedulers. – home Mar 24 '12 at 09:14
2 Answers
0
The answer given by home in the comment is what I wanted - Check this: running periodic task at server side for servlet JSP MVC website There are a number of different ways to implement schedulers.
0
the easiest way to this is to set up a php server and run a cronjob every 15 minutes
unix: http://en.wikipedia.org/wiki/Cron Windows: http://support.microsoft.com/kb/308569
-
Hm, I'd say this makes everything a lot more complex... I absolutely makes sense to implement schedulers in the application itself. Why introducing another technology? – home Mar 24 '12 at 09:27