File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Java in General
Bookmark "writting a reminder program" Watch "writting a reminder program" New topic

writting a reminder program

kelly devon
Ranch Hand

Joined: Apr 15, 2004
Posts: 77
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

Martijn Verburg

Joined: Jun 24, 2003
Posts: 3275

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: 1139

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 ???

I agree. Here's the better link:

kelly devon
Ranch Hand

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

Joined: Mar 22, 2005
Posts: 42965
Too bad about the platform independence. If you were solely concerned about Unix-ish operating systems, you could check out Remind:
I agree. Here's the link:
subject: writting a reminder program
It's not a secret anymore!