Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to run java application with specified time intervals..?

 
lokesh pattajoshi
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have faced problem after visiting some online java sms portal..They have some features like you need to provide time and date(daily , weekly , monthly) and at that specified time they will send sms to you.so i think through scheduler this task can't be performed so can any body have idea how to implement this features...Your answer is appreciated.

Thanks and Regards
Lokesh
 
Steve Luke
Bartender
Posts: 4181
21
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use your operating system's built-in scheduler to run the java application (like Windows Scheduler or cron). Or you could use a third party scheduler like Quartz.
 
lokesh pattajoshi
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Steve thanks for your replay.The interval value will come dynamically so except scheduler is there any other way to perform it..?
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15286
39
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you think you cannot use a scheduler? A scheduler is exactly meant for that job: run a task at a certain time.

You could also have a look at class java.util.Timer and java.util.TimerTask.
 
lokesh pattajoshi
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Steve Timer class schedule method helped me..thanks for your valuable info..

bye
see you
cheer.......

Regards
Lokesh
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic