This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need help regarding scheduler program

 
Keerthi Kumar
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Henry Wong
author
Marshal
Pie
Posts: 20892
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic