aspose file tools*
The moose likes Threads and Synchronization and the fly likes Need help regarding scheduler program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Need help regarding scheduler program" Watch "Need help regarding scheduler program" New topic
Author

Need help regarding scheduler program

Keerthi Kumar
Ranch Hand

Joined: Apr 20, 2009
Posts: 105
Dear All,

I am new to thread programming. I have a requirement, where I need to crawl data from different repositories as per the scheduled date and time. So, when there is a scenario that one job starts executing and keeps continuing for more than the expected time and a new job has to be executed with the same time, what needs to be done.

a. because, the first job would be still running.
b. also the second job has to starts is execution as per the schedule.
c. also, the requirement is even if the first job is still executing after the given time, the second job has to start his execution.

Request to please help me out in the above scenarios


Cheers,
Keerthi Kumar N
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18988
    
  40

Keerthi Kumar wrote:Dear All,

I am new to thread programming. I have a requirement, where I need to crawl data from different repositories as per the scheduled date and time. So, when there is a scenario that one job starts executing and keeps continuing for more than the expected time and a new job has to be executed with the same time, what needs to be done.

a. because, the first job would be still running.
b. also the second job has to starts is execution as per the schedule.
c. also, the requirement is even if the first job is still executing after the given time, the second job has to start his execution.

Request to please help me out in the above scenarios


The built in Java job scheduller -- java.util.concurrent.ScheduledThreadPoolExecutor -- uses a thread pool, so two jobs can be running concurrently.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need help regarding scheduler program