05-12-2011 7:21 AM
Hi All,
I have a job that is scheduled to run every 5 minutes in our production environment. However , this job frequently exceeds a runtime of 5 minutes and as a consequence gets cancelled by the next running job. I need to find a way to cancel/terminate this job in the event that it exceeds 4m45s. I want to do this using another job which should be event trigerred, the event being the original job exceeding the runtime of 4m45s. Please suggest how I can do this. Thanks.
Joyee
05-12-2011 8:31 AM
At the start of your job, kick off another job that's due to run in 4 minutes 45s. Supply that job with the first job's id. When the second job runs, it cancels the first job.
The function modules to do this should be easily obtainable via a quick search.
05-12-2011 8:47 AM
I cant help it this sounds a little like caring about the symptoms instead of curing the disease.
Isnt there a possibility to e.G. rework the coding of your first job to increase its performance and make sure it wont take more than 4 minutes and 45 seconds?
Ok i´m not aware of the Problems you are facing, maybe your job has to wait for something and therefor cant be improved further. But still if there is any possibility to make sure its runtime wont exeed 5 minutes then this should be the way to go in my eyes.
05-12-2011 3:26 PM
cut these many duration in to reuseability concepts so that it can run into min like include functona module subrountines persorm good performance
or can be checl in se01 for runtime analysis
05-12-2011 5:33 PM