<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Batch job and Event trigger in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769533#M1462963</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So let me try to answer your questions:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I am still getting a "Cancelled" job when more than one ran and it is not finished, the other Process_Message job fails(Cancelled status which then sends out an email alert to our email).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Weird. If you have setup the PROCESS_MESSAGE job like I described below, where you only invoke the RSBTONEJOB2 as the only step, this shouldn't happen. I could see possible problems in a case where you invoke via RSBTONEJOB2 a program that schedules another job or kick off some asynchronous task. However, in that case one would expect that the error should show up somewhere else, not in the PROCESS_MESSAGE job. Your question 2 though seems to indicate that it works?!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. The Process_Message job runs and in the job log it says OK, 1 job running but sometimes it says OK, 2 jobs running and the status is "Finished". When I see the message "OK, 2 jobs running" with a status of "Finished", what does that mean? That it actually DID NOT try to run the job(2nd job) because 1 is still active but did not abort the job that is why the status is Finished (which is what we want).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This is basically what RSBTONEJOB2 does: It checks how many instances of the job with the given job name (so in your case PROCESS_MESSAGE) are running and if it finds more than one, it simply exits without doing anything. If it finds exactly one job (i.e. the one from which it was invoked), then everything is ok and it proceeds with the invocation of the actual program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So a message like &amp;lt;em&amp;gt;OK, 2 jobs running with a status of "Finished"&amp;lt;/em&amp;gt; means that the job ended without actually invoking the underlying program you want to run. So from that perspective it's as if the job never ran...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's a feature of RSBTONEJOB2 that the job doesn't get canceled and just stops without really doing anything (what you want); for cases where you'd want the job to get canceled you could use RSBTONEJOB. However, this is in your case not required, since overlapping jobs are anyhow recognized, but those two programs were designed for cases where overlapping jobs wreaked havoc, because this scenario was not recognized.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if there are 5 Process_Message jobs that got triggered and try to run, will RSBTONEJOB2 keep one job running while the other 4 will stop running (but will not have a status of cancelled)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Correct as long as the first job that got invoked is still running when the remaining 4 jobs get triggered.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 17 Apr 2010 07:59:14 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-04-17T07:59:14Z</dc:date>
    <item>
      <title>Batch job and Event trigger</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769515#M1462945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using the standard SAP Event SAP_NEW_PROCESS_MESSAGE to trigger a batch job.&lt;/P&gt;&lt;P&gt;However, when 3 messages come in, 3 jobs are triggered with the other 2 being cancelled by SAP since only 1 should run to avoid the same message being processed by the same program and while this 1 job is running and additional messages come in, another set of batch job runs but is automatically cancelled by SAP.&lt;/P&gt;&lt;P&gt;How do i avoid having 3 jobs running at the same time given that I am using the event trigger to run the job?&lt;/P&gt;&lt;P&gt;In SM36, when you put the Start Condition, you can only put 1 condition and not 2 conditions(Event and no other job is running).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If someone can help me with setting it up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if I need to create a program, how will it be set up and what table do i need to read?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Apr 2010 17:28:46 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769515#M1462945</guid>
      <dc:creator>shirley_te</dc:creator>
      <dc:date>2010-04-14T17:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: Batch job and Event trigger</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769516#M1462946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of using event to trigger job can you try scheduling it to run periodically say 5 mins interval?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Ramesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Apr 2010 19:19:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769516#M1462946</guid>
      <dc:creator>ramesh_mahankali</dc:creator>
      <dc:date>2010-04-14T19:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: Batch job and Event trigger</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769517#M1462947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We cannot schedule every 5 minutes because we need that the message is processed as soon as it is created for a realtime run.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have other options?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shirley&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Apr 2010 19:29:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769517#M1462947</guid>
      <dc:creator>shirley_te</dc:creator>
      <dc:date>2010-04-14T19:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: Batch job and Event trigger</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769518#M1462948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I assume you are trying to send the process messages as they got created in SAP.&lt;/P&gt;&lt;P&gt;and what is the error message that you are seeing when job cancels itself? is it "Preceding job not yet completed"?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Ramesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Apr 2010 19:51:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769518#M1462948</guid>
      <dc:creator>ramesh_mahankali</dc:creator>
      <dc:date>2010-04-14T19:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: Batch job and Event trigger</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769519#M1462949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ramesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are 100% correct.  I am sending new process message and the error message you indicated is exactly the error message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help me avoid having this as the cancelled jobs are sending out an email alerts(which are too many) and we don;t want our operations people to get that alert for this specific job but other jobs that are cancelling, we want the operators to get their alert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this cannot be avoided (multi jobs with others cancelling out).  Do you know how to control the Email alert such that for this job it will not send out the CCMS alert for tracking Background\Aborted Jobs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shirley&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Apr 2010 20:08:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769519#M1462949</guid>
      <dc:creator>shirley_te</dc:creator>
      <dc:date>2010-04-14T20:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: Batch job and Event trigger</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769520#M1462950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that is not possible.That is the reason we have set up to run this job every minute.&lt;/P&gt;&lt;P&gt;Even though some times(not very often) this job takes more than a min and subsequent job started after a min will fails with the error message that I gave.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope you also may have to do the same thing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Ramesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Apr 2010 20:16:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769520#M1462950</guid>
      <dc:creator>ramesh_mahankali</dc:creator>
      <dc:date>2010-04-14T20:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: Batch job and Event trigger</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769521#M1462951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ramesh.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The business wants the we continue to run based on trigger.  Would you know if by creating a program that will be trigger by the new process message and then call another job that will check if such job is not running yet to then submit the job is possible?&lt;/P&gt;&lt;P&gt;if yes, how?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shirley&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Apr 2010 20:57:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769521#M1462951</guid>
      <dc:creator>shirley_te</dc:creator>
      <dc:date>2010-04-14T20:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Batch job and Event trigger</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769522#M1462952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes..you have to create a custom program to trigger the "actual job" if there is no "active actual job"  running. If it is running then wait for until it is completed and run the "actual job".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Ramesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Apr 2010 21:14:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769522#M1462952</guid>
      <dc:creator>ramesh_mahankali</dc:creator>
      <dc:date>2010-04-14T21:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Batch job and Event trigger</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769523#M1462953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shirley,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP has the programs RSBTONEJOB and RSBTONEJOB2 to prevent multiple instances of the same job running. They have to be scheduled as a job step and you'll have to enter the program and variant that they should invoke. In case of another job instance already running, the first program terminates the job with an error message, whereas the second one simply exits the job without executing the program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Most likely this doesn't fit your requirements, because they only guarantee that only one job instance is active, but they don't ensure that all the invoked jobs do the work they're supposed to do. So in your case with three events raised and then two events possibly getting their job stopped might result in data not getting processed. If you need that, then I think there's no standard program for that and you'd have to go with Ramesh's suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers, harald&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Apr 2010 22:41:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769523#M1462953</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-14T22:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: Batch job and Event trigger</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769524#M1462954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Harald,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This sounds interesting.&lt;/P&gt;&lt;P&gt;What I have right now is just 1 job with a trigger event of SAP_NEW_PROCESS_MESSAGE.  However, when 3 messages come in, the job is then triggered 3 times but the other 2 is immediately cancelled by SAP with an error message "Preceeding job is not yet complete" which is correct.  The objective I am trying to achieve is if there are 3 or 4 messages that come in, I want that only 1 job runs and not 4 since the other 3 will be cancelled anyway and we have a CCMS alert that goes out for any cancelled job and this particular cancelled jobs are valid and we do not want to get an alert since 1 job is running and is enough to process the other 3 messages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your example, can you let me know who to set it up since you said it should be set up as a job step?  The current Batch set up I have is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Job Name:   Process_Message&lt;/P&gt;&lt;P&gt;Job Start Condition:&lt;/P&gt;&lt;P&gt;After Event&lt;/P&gt;&lt;P&gt;Event: SAP_NEW_PROCESS_MESSAGES&lt;/P&gt;&lt;P&gt;Step 1: program to run RCOCB002&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I were to use the 2 programs you indicated, can you  let me know how I will set it up taking into account that the job is triggered by an event and I only want one job to run even if the trigger is 5(5 messages comes in almost at the same time) and not 5 of the same Job (Process_Message).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shirley&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Apr 2010 13:37:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769524#M1462954</guid>
      <dc:creator>shirley_te</dc:creator>
      <dc:date>2010-04-15T13:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: Batch job and Event trigger</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769525#M1462955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ramesh.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was thinking how?  Because my trigger would still be the new process message.&lt;/P&gt;&lt;P&gt;Will I then set it up as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Job Name:  Process_Message&lt;/P&gt;&lt;P&gt;Start Condition:&lt;/P&gt;&lt;P&gt;After Event: SAP_NEW_PROCESS_MESSAGE&lt;/P&gt;&lt;P&gt;Step 1:  my custom program which will then invoke Job 2 below if job 2 is not yet running(but how?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Job Name:  Run_Message&lt;/P&gt;&lt;P&gt;Start Condition:  What will this be?  &lt;/P&gt;&lt;P&gt;Step 1:  the real program that process the message (RCOCB002)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the above example, the first job (Process_Message) will be triggered as new message comes in and maybe in my program I can just end if I see that job 2(Run_Message) normally without "cancellation"  but how will i trigger Job 2(Run Message)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, do you know the table that I can check to know that Job 2(Process_message) is running(Active)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shirley&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Apr 2010 13:44:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769525#M1462955</guid>
      <dc:creator>shirley_te</dc:creator>
      <dc:date>2010-04-15T13:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: Batch job and Event trigger</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769526#M1462956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use this FM to create a job BP_JOB_CREATE with required steps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use tables TBTCO/TBTCP t check the previous jobs. This needs to be done in custom program until the job is finished and once it is finished use the above FM to run the "actual job".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Ramesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Apr 2010 14:36:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769526#M1462956</guid>
      <dc:creator>ramesh_mahankali</dc:creator>
      <dc:date>2010-04-15T14:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: Batch job and Event trigger</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769527#M1462957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ramesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are pretty new with the Batch job in SAP so if you can give me a sample of how I will set up the batch job?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do I set up 2 or do i set up 1?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you can like use the example I placed earlier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Apr 2010 15:04:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769527#M1462957</guid>
      <dc:creator>shirley_te</dc:creator>
      <dc:date>2010-04-15T15:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: Batch job and Event trigger</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769528#M1462958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The objective I am trying to achieve is if there are 3 or 4 messages that come in, I want that only 1 job runs and not 4 since the other 3 will be cancelled anyway \[..\]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Ok, so you could utilize program RSBTONEJOB2 for that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;\[..\] we do not want to get an alert since &lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;1 job is running and is enough to process the other 3 messages&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Let me give a general comment without having looked at your specific example. In most cases I'd expect your statement to be wrong. E.g. let's assume like so many programs, you have one that selects relevant objects and then processes them. So by the time the 3 other events kick in, the first job might have finished selecting all the objects and is now processing them. Any new objects that were created since then would be simply ignored.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's why I initially commented that I doubt that this is what you're looking for and it seemed to me that Ramesh's comment with the custom program waiting for the job to finish was right on track. Some further thought probably should go into such a solution, because I'd expect that you don't want to queue up more than one waiting job...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your example, can you let me know who to set it up since you said it should be set up as a job step?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The program RSBTONEJOB2 is straightforward. If you look at the coding you'll see that it's really simple. It basically just checks how many jobs with the given name are running and only submits the given program with the variant if there is exactly one job.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So in your case you should redefined your job PROCESS_MESSAGE and replace the first step with an execution of program  RSBTONEJOB2  with a variant using the following parameters:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
JOBNAME : PROCESS_MESSAGE
REPORT  : RCOCB002
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Test it, check the job logs. You will see that RSBTONEJOB2 will effectively guarantee that only one job instance is running. It will not guarantee though that all the data gets processed as this might not work due to the suppression of additional jobs. However, you could use this program as a template and implement the additional waiting mechanism Ramesh described.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Apr 2010 15:13:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769528#M1462958</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-15T15:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: Batch job and Event trigger</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769529#M1462959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Harald.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will set it up and change the step to run the program you mentioned to test.  Does this mean that my Process_Message is the only job I need and I can continue to use the Trigger event "SAP_NEW_PROCESS_MESSAGE"? to trigger Process_Message job?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Apr 2010 15:23:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769529#M1462959</guid>
      <dc:creator>shirley_te</dc:creator>
      <dc:date>2010-04-15T15:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: Batch job and Event trigger</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769530#M1462960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Harald,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This seems to be a promising solution.  It is okay for only 1 job to run since SAp in itself cancels the other jobs with an error saying, "Preceding job is not completed" instead of waiting so your concern that some records may not be processed is not the case since the current state we have they are not queued by SAP but immediately cancelled when it  detects the one job is running.&lt;/P&gt;&lt;P&gt;The program that is being run is a BDC and does not select a set of data at the time of run but goes through the table as it runs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Apr 2010 16:18:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769530#M1462960</guid>
      <dc:creator>shirley_te</dc:creator>
      <dc:date>2010-04-15T16:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: Batch job and Event trigger</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769531#M1462961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Harald,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have set up the job Process_message to have the RSBTONEJOB2(with this calling the real program and checking on the job PROCESS_MESSAGE).  My questions are:&lt;/P&gt;&lt;P&gt;1.   I am still getting a "Cancelled" job when more than one ran and it is not finished, the other Process_Message job fails(Cancelled status which then sends out an email alert to our email).  The job log error is still saying "Preceding job not yet completed".  Why is that so?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.  The Process_Message job runs and in the job log it says OK, 1 job running but sometimes it says OK, 2 jobs running and the status is "Finished".  When I see the message "OK, 2 jobs running" with a status of "Finished", what does that mean?  That it actually DID NOT try to run the job(2nd job) because 1 is still active but did not abort the job that is why the status is Finished (which is what we want).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, our objective is to only run run job when the trigger happens while the other Process_Message job kicks in BUT will not really run the real program but without having a "Cancelled" status so we don't receive multiple email alerts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Shirley&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Apr 2010 19:58:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769531#M1462961</guid>
      <dc:creator>shirley_te</dc:creator>
      <dc:date>2010-04-16T19:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: Batch job and Event trigger</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769532#M1462962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Harald,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THe other question I have is if there are 5 Process_Message jobs that got triggered and try to run, will RSBTONEJOB2 keep one job running while the other 4 will stop running (but will not have a status of cancelled)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and hoping to receive feedback from you for the 3 questions I sent out&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shirley&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Apr 2010 20:03:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769532#M1462962</guid>
      <dc:creator>shirley_te</dc:creator>
      <dc:date>2010-04-16T20:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: Batch job and Event trigger</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769533#M1462963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So let me try to answer your questions:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I am still getting a "Cancelled" job when more than one ran and it is not finished, the other Process_Message job fails(Cancelled status which then sends out an email alert to our email).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Weird. If you have setup the PROCESS_MESSAGE job like I described below, where you only invoke the RSBTONEJOB2 as the only step, this shouldn't happen. I could see possible problems in a case where you invoke via RSBTONEJOB2 a program that schedules another job or kick off some asynchronous task. However, in that case one would expect that the error should show up somewhere else, not in the PROCESS_MESSAGE job. Your question 2 though seems to indicate that it works?!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. The Process_Message job runs and in the job log it says OK, 1 job running but sometimes it says OK, 2 jobs running and the status is "Finished". When I see the message "OK, 2 jobs running" with a status of "Finished", what does that mean? That it actually DID NOT try to run the job(2nd job) because 1 is still active but did not abort the job that is why the status is Finished (which is what we want).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This is basically what RSBTONEJOB2 does: It checks how many instances of the job with the given job name (so in your case PROCESS_MESSAGE) are running and if it finds more than one, it simply exits without doing anything. If it finds exactly one job (i.e. the one from which it was invoked), then everything is ok and it proceeds with the invocation of the actual program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So a message like &amp;lt;em&amp;gt;OK, 2 jobs running with a status of "Finished"&amp;lt;/em&amp;gt; means that the job ended without actually invoking the underlying program you want to run. So from that perspective it's as if the job never ran...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's a feature of RSBTONEJOB2 that the job doesn't get canceled and just stops without really doing anything (what you want); for cases where you'd want the job to get canceled you could use RSBTONEJOB. However, this is in your case not required, since overlapping jobs are anyhow recognized, but those two programs were designed for cases where overlapping jobs wreaked havoc, because this scenario was not recognized.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if there are 5 Process_Message jobs that got triggered and try to run, will RSBTONEJOB2 keep one job running while the other 4 will stop running (but will not have a status of cancelled)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Correct as long as the first job that got invoked is still running when the remaining 4 jobs get triggered.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Apr 2010 07:59:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769533#M1462963</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-04-17T07:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: Batch job and Event trigger</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769534#M1462964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Harald,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is how I have set up the job. I only have 1 step which is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No. Program name/command Prog. type Spool list Parameters  User Lang.&lt;/P&gt;&lt;P&gt; 1  RSBTONEJOB2          ABAP                  NEW_MESSAGE TESS EN&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Apr 2010 21:55:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/batch-job-and-event-trigger/m-p/6769534#M1462964</guid>
      <dc:creator>shirley_te</dc:creator>
      <dc:date>2010-04-19T21:55:10Z</dc:date>
    </item>
  </channel>
</rss>

