Win a copy of Practical SVG this week in the HTML/CSS/JavaScript 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
Sheriff
Posts: 22542
109
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
 
I'm THIS CLOSE to ruling the world! Right after reading this tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!