aspose file tools*
The moose likes Servlets and the fly likes How do I make a sevlet be called once a day? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How do I make a sevlet be called once a day?" Watch "How do I make a sevlet be called once a day?" New topic
Author

How do I make a sevlet be called once a day?

Anthony Smith
Ranch Hand

Joined: Sep 10, 2001
Posts: 285
I have a servlet in which I would like to be called once a day at a certain time? How do I accomplish that?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12835
    
    5
What is supposed to call it?
Anthony Smith
Ranch Hand

Joined: Sep 10, 2001
Posts: 285
Well I don't know. My last resort was to create a java program that wouls spawn a thread and sleep for 24 hours or something. Is it possible to do something that fires the servlet off on startup and then have it be called every 24 hours or whatever time. I know that i could arrange for a servlet to start on startup
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Why do you want to use a servlet for that ?? The servlet can be used to start a timer bean e.g. (There is one provided by the J2SE spec if i remember correct) but not to be the timer itself.
Anthony Smith
Ranch Hand

Joined: Sep 10, 2001
Posts: 285
I want the sql to delete some records in my db each morning.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61756
    
  67

Why not just write a little Java program to do it? A servlet doesn't make much sense for that.
bear


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do I make a sevlet be called once a day?