Results 1 to 2 of 2
- 08-03-2007, 05:40 AM #1
Member
- Join Date
- Aug 2007
- Posts
- 5
- Rep Power
- 0
Urgent-Imp-Displaying message with respect to system time
I have a table (TimeTable) in database and column name is Current time:
Table Name: TimeTable
TimeTable
CurrentTime
03.00.00.000000 AM
04.00.00.000000 AM
05.00.00.000000 AM
10.00.00.000000 AM
12.00.00.000000 PM
Now My java Program should do the following:
Reading the data from the database.
And Now pick up the time from table and when the time matches with the system time
it need to trigger or dispaly a message "Hello".This should happen with all the records
in the table with respect to their time.
If i take the above database table as example:
At 3'o clock it has to display "Hello" and again 4'o clock
again it has dispaly "Hello". Like this it has to happen for the rest of the
rows also.
Provide me the answers for the below questions
1)Help me with this kind of code where i can schedule and trigger the message for display.
2) The Program should run always and it should look up the system time and
display the message when ever the time occurs.
Pavan
- 08-03-2007, 02:17 PM #2levent Guest
You can access your database table with JDBC.
When you initially launched your program, it will get the nearest alarm time from table and remove it from the table. You will start a timer to launch a specific event at the fetched alarm time. And after that timer is executed, you will fetch the next alarm time from database and restart a timer.
For timer functionality, check Timer class in Java SE.
Similar Threads
-
setting system clocks time
By pks in forum New To JavaReplies: 4Last Post: 05-14-2009, 03:36 AM -
displaying string
By jamborta in forum AWT / SwingReplies: 6Last Post: 01-23-2008, 07:15 PM -
Displaying charts in a jsp
By Priyanka in forum Java ServletReplies: 1Last Post: 11-16-2007, 10:59 AM -
Images not displaying in JSP in IE7
By chadscc in forum Advanced JavaReplies: 0Last Post: 11-13-2007, 03:24 PM -
error message on jsp
By sandor in forum Web FrameworksReplies: 1Last Post: 04-11-2007, 02:10 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks