This week's book giveaway is in the Performance forum.
We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!
See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

writting a reminder program

 
kelly devon
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You probably want to use something like Quartz to do this (Open Source Java scheduler).
 
salvin francis
Bartender
Posts: 1280
10
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ???
 
kelly devon
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes its platform independent, thanks a mil guys
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic