Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Scheduled Tasks in Java. Help!!!

 
Craig Snowbarger
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am wanting to automatically send an email at a predetermined time. Any suggestions of a good way to implement this?
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Craig,
Use the timer class. Get todays date in seconds and subtract it from the date in seconds what you want to turn on. Use absolute values so that negatives don't get involved. Then just setup the timer to wakeup in that amount of time!
Enjoy,
Manfred.
 
The knights of nee want a shrubbery. And a tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!