The moose likes Beginning Java and the fly likes Task Sheduling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Task Sheduling" Watch "Task Sheduling" New topic
Author

Task Sheduling

crazzzy coder
Greenhorn

Joined: Oct 09, 2011
Posts: 5
Hi All,
How can i shedule one task in java daily , weekly monthly with out using java.util.timer

thanks in advance
Ove Lindström
Ranch Hand

Joined: Mar 10, 2008
Posts: 326

crazzzy coder wrote:Hi All,
How can i shedule one task in java daily , weekly monthly with out using java.util.timer

thanks in advance



You use the Scheduled Executor Service. http://download.oracle.com/javase/1,5.0/docs/api/java/util/concurrent/ScheduledExecutorService.html
Ove Lindström
Ranch Hand

Joined: Mar 10, 2008
Posts: 326

And welcome to the ranch.

Please take a look at http://www.javaranch.com/name.jsp and then go into your profile and correct the name.
crazzzy coder
Greenhorn

Joined: Oct 09, 2011
Posts: 5
Thanks..........
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
with out using java.util.timer

Reading something like this, I always wonder: is there an actual reason for that, or is it more like a manager-doesn't-like-feature-X-so-forbids-it-for-no-good-reason-and-nobody-dares-question-him kind of things.
Ove Lindström
Ranch Hand

Joined: Mar 10, 2008
Posts: 326

Tim Moores wrote:
with out using java.util.timer

Reading something like this, I always wonder: is there an actual reason for that, or is it more like a manager-doesn't-like-feature-X-so-forbids-it-for-no-good-reason-and-nobody-dares-question-him kind of things.


Most likely yes. But it is often the lead system architect that makes the decision to "start using the concurrency package since it is easier and more robust than using timers" and then communicates that with the manager. The thing with managers is that they tend to only remember the last part of a sentence. So they say "you are not allowed to use timers. They are not robust." ;)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Task Sheduling