To limit the run time of a background job

0 pts.
Tags:
Basis
Hi, I want to know the method to specify a time limit for the background job to run, and if the background job run time exceeds the specified limit the job should get cancelled automatically. Thanks.
ASKED: June 17, 2005  4:22 AM
UPDATED: June 22, 2005  12:43 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

When you create the job in sm36 you have the ability to have “no start after %date,time%” if you have run the job and have an idea how long this takes then you could specify the time it takes and add it to time start and no start after that period afterwhich the job is rescheduled for the next run.

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Davidbest
    I don't think the previous reply is accurate. The "No start after" controls whether or not a job starts if it is in a delay status (ie, all BGD are occupied at the start time and the job can not start yet.) Here's an example: You have three BGD processes Your job is scheduled as: Start: Today @ 9:00AM No start after: Today @ 9:05AM At 9:00AM all three BGDs are busy, and they stay that way until 9:10AM. In this example, the job described above would not start, because it met the "Do not start after" criteria of 9:05AM. OK, now on to the question at hand: I think we need more information about what you are trying to do, because there is no built-in method to limit background work process run time without a third-party, external job scheduler. There may be some creative way to work around your problem, but that requires more information. Regards, David
    0 pointsBadges:
    report
  • Abcdef28
    To be more specific, there is one job which should be run daily and if the job run time exceeds 15min it should be cancelled. If anyone of u have worked on this, please let me know.
    0 pointsBadges:
    report
  • Davidbest
    abcdef28, please be more specific about what you are trying to do. There is no simple answer to your question, so it will take more analysis to help you, and analysis requires information... How is the job defined? What is the purpose of the job, and why do you want it to stop after 15 minutes (seems like a strange requirement to me, under normal circumstances). What is the job step (or steps) and are they ABAP or external commands? I have created some jobs with strange timing constraints, but it took a lot of effort to design. We really would need to know why you're asking for a non-standard behavior. A couple of options I can think of are: 1. Create an ABAP program that submits the program as a function call, so that it would run in dialog and be constrained by rdisp/max_wp_runtime. Then schedule a job to run that ABAP program. If the resulting dialog runs over the limit, it will end, but I'm not sure the batch job would end in "Cancelled" status. 2. Get an external job scheduler application (not cheap, nor easy to implement), which has much more granular job control than the standard, SAP-provided job scheduler. If you do find a solution, please reply to the group so we know what solution you find. Regards, David
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following