Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Terminate long running job

Former Member
0 Kudos

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

4 REPLIES 4

matt
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

0 Kudos

What??????????????