• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Check for time

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi there,
I'm doing a calendar. And this calendar allows users to enter events as reminder. They will key in the details and more importantly the time to activate the reminder.
So was think how do i code so when the application is running, it will keep checking on the phone time against the scheduled time.
Thanks
 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use the Timer and TimerTask classes (in java.util).

You can schedule a task to be run periodically. That task can check the current time against the scheduled time and do whatever is required at the scheduled time.

Alternatively (and probably a better solution) you can schedule your task to be run at the specified time.
[ January 09, 2005: Message edited by: Tomas Conway ]
 
author
Posts: 1436
6
Python TypeScript Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ice ice,

Please change your display name to conform to the JavaRanch naming policy, which you had agreed to when you signed up.

thanks.
Michael (the moderator)
 
reply
    Bookmark Topic Watch Topic
  • New Topic