This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes writting a reminder program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "writting a reminder program" Watch "writting a reminder program" New topic
Author

writting a reminder program

kelly devon
Ranch Hand

Joined: Apr 15, 2004
Posts: 75
hi,
i am writting a program that needs to remind me that registration day will expire in two months, then after that it will remind me again in two weeks and then in two days, please how do i go about it i know i have to use a scheduler and a thread with reference to the calender but can any one help me with hints on how to start please, thanks


kel
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

You probably want to use something like Quartz to do this (Open Source Java scheduler).


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 917

Well, i dont knw abt Quartz, but let me put this in a traditional way:

You would need a thread that eternally executes and waits for an event to trigger. For an event that would occur after a few months, you obviously need your java program to keep executing at all times:
1. Assume the machine is on 24 hours for 2 months (this can happen if your target application is a Server. so, you an start a servlet with your application)
2. The machine is not always on (Well, you have to find a way to add your program to a machine startup eg startup folder in windows)

Of course windows has a scheduler that can execute programs at intervals. But are we making a platform dependent program ???


My Website: [Salvin.in] Cool your mind:[Salvin.in/painting] My Sally:[Salvin.in/sally]
kelly devon
Ranch Hand

Joined: Apr 15, 2004
Posts: 75
yes its platform independent, thanks a mil guys
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41083
    
  43
Too bad about the platform independence. If you were solely concerned about Unix-ish operating systems, you could check out Remind: http://www.linuxjournal.com/article/3529


Ping & DNS - my free Android networking tools app
 
jQuery in Action, 2nd edition
 
subject: writting a reminder program
 
Similar Threads
Sync DataBases Postgre SQL and My sql
how to open debug window in jbuilder
filename, directory name, or volume label syntax is incorrect error in the try catch
Read and write XML, Skip some tags, Skipped has to be written in different file
connecting jdbc with oracle