on 04-29-2014 1:38 PM
Hi Experts,
I have written one java class which will split the file in a certain location. I have scheduled this Java class to be executed by a Job in NW scheduler.
My question is , is it possible to check if there are any instance of a particular Job definition is running inside from another job?
For e.g - lets say I have created one Job Definition and scheduled a Task which should execute in every 5 minutes.
Now let us assume each job can take 15 minutes to complete, so when Job1 will start it will start splitting the file and after 5 minutes the Job2 will start.
So is there a way to check from Job2 if Job1 is completed? or any instance of the same Job definition is running in the Scheduler?
Your help is much appreciated!
Thanks
Sugata B
Hi Experts,
Please advise.. any Update?
Thanks
Sugata B
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sugata,
Have you checked the Job Scheduler API?
The Scheduler interface provides a method to retrieve Jobs by a JobFilter (It is possible to set the JobDefinition).
Example from the SAP Scheduler Javadoc:
JobIterator iter = scheduler.getJobs(myFilter, null, 1000);
Job[] jobs = iter.nextChunk();
// do something with the returned job ojbects
while(iter.hasMoreChunks()) {
iter = scheduler.getJobs(myFilter, iter, 1000);
Job[] jobs = iter.nextChunk();
// do something with the returned job objects
//
}
Regards,
Christian
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.