Reminder Program

Discussion of programming on Linux, including shell scripting, perl, python, c/c++, mono, java. Whatever tickles your fancy.
waqaskhawaja
Lance Naik
Posts: 44
Joined: Thu Aug 31, 2006 8:52 pm
Location: Lahore Pakistan
Contact:

Reminder Program

Postby waqaskhawaja » Tue Aug 07, 2007 7:43 pm

Using MySql and Java, I have to write a program for reminders. A reminder's date and time could be set and then an alert to the user is displayed on the date and time that was set.

How do I know that it is now time to alert the user? I do not want to check the reminders table every five minutes. Most of the search at google returned birthday reminders that work on a specific date. Checking for a date once in a day is alright but how to manage time-based reminders?

lambda
Major General
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Location: Lahore
Contact:

Postby lambda » Wed Aug 08, 2007 12:20 am

why don't you want to check once every five minutes?

i guess you could load the next hour's data once an hour, and then fire off threads to deal with the messaging every five minutes.

waqaskhawaja
Lance Naik
Posts: 44
Joined: Thu Aug 31, 2006 8:52 pm
Location: Lahore Pakistan
Contact:

Postby waqaskhawaja » Wed Aug 08, 2007 3:38 pm


lambda
Major General
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Location: Lahore
Contact:

Postby lambda » Wed Aug 08, 2007 4:27 pm



Return to “Programming”

Who is online

Users browsing this forum: No registered users and 1 guest