Results 1 to 6 of 6
Thread: Timer usage in java program
- 01-22-2008, 09:27 AM #1
Member
- Join Date
- Jan 2008
- Posts
- 24
- Rep Power
- 0
- 01-22-2008, 10:31 AM #2
It does not need to be compiled everyday but it needs to be run every day. You can start the program and let it run in background thereafter.
And Welcome to the community ..dont worry newbie, we got you covered.
- 01-22-2008, 10:39 AM #3
Member
- Join Date
- Jan 2008
- Posts
- 24
- Rep Power
- 0
Thank you, I will try it.
- 01-22-2008, 10:54 AM #4
Member
- Join Date
- Jan 2008
- Posts
- 24
- Rep Power
- 0
Do you mean that I should (always)run the program when I start the computer.
- 01-23-2008, 06:37 AM #5
Yes and you can also use operating system's scheduler to execute your java program in given time.
dont worry newbie, we got you covered.
- 01-24-2008, 07:16 PM #6
Member
- Join Date
- Jan 2008
- Posts
- 20
- Rep Power
- 0
We are not sure, if you are using this as part of a web application. If so, there is an easy way to start the timer whenever your application server starts.
It is usually a practice to start Servlets when the application server starts up. You can do this by setting the value for load-on-startup as 1.
<load-on-startup>1</load-on-startup>
Now, add code to start your thread (Timer) in the init() method of the Servlet.
Hope this helps!Last edited by JavaBean; 01-24-2008 at 08:00 PM. Reason: No url at the end of every post!
Similar Threads
-
How to determine CPU usage using Java?????
By JavaEmpires in forum New To JavaReplies: 5Last Post: 03-16-2011, 04:49 AM -
How to cancel an individual timer in spite of canceling whole timer
By Java Tip in forum java.utilReplies: 0Last Post: 04-04-2008, 02:46 PM -
making a count down timer using java
By saytri in forum New To JavaReplies: 3Last Post: 12-29-2007, 09:49 PM -
Help with timer in java
By barney in forum Advanced JavaReplies: 1Last Post: 08-01-2007, 10:24 AM -
Problem with timer in java
By paul in forum Advanced JavaReplies: 3Last Post: 07-26-2007, 10:18 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks