Schedule job with dependencies in another job

Hi All,
         I Have a job in sm36 schedule but I want to create a new job and will be started after my first job,
   for exemple : I have a job Test1 started in 30 and 30 minutes and I create a new job test2 that this job has to executable after the job test1, I can to do this but my slave job only executable one time, I need that this job stay continued always after job test1 and don't finish.
Thank for Help.
Regards,
Osvaldo Antonio dos Santos

Hi,
I am afraid your reqmt may not be possible.
You can very well run one job after another job by maintaining the After event parameters in SM36. However you cannot enable a job run for ever. Once there is no input meeting the selection criteria, teh job will finish.
Instead of thinking of enabling the job for ever, you can maintain the jobtest2 as after event of jobtest1.
After that you can create jobtest3 using the same variant of jobtest2 and schedule it to run once in 15 min or 30min or so.
Hope this helps you
Pls reward if it is of some help to you

Similar Messages

  • Schedule Job with Job_close after successful job doesn't work

    Hi guys,
    I'm using FM CLOSE_JOB with parameters : 
                JOBCOUNT             = w_JobId
                JOBNAME              = w_JobName
                PREDJOB_CHECKSTAT    = 'X'
                PRED_JOBCOUNT        = w_oldJobId
                PRED_JOBNAME         = w_oldJobName
    I have about 9 jobs wich must run the one after the others. The first start without PRED* parameters, but the 8 others one are filled with CHECKSTAT, and previous job name and id.
    It works fine for the side "the one after the others", BUT, wathever the previous job give as result (cancelled or finished), the next one starts whereas I pass the parameter CHECKSTAT to X.
    Any ideas of the problem and how to solve it?
    Thanks in advance for your answers.

    Here my code with explanation :
    REPORT  YCOMJ023.
    start-of-selection.
    "Initialization of my vars
    w_StepCount = 0. >> number of steps maxi in a job
    w_jobCount = 1.  >> number to see easier in SM37 the job order
    CONCATENATE pe_name '_STEPS' w_jobCountC INTO w_JobName. (example : TOTO_STEP1)
    CONDENSE w_JobName NO-GAPS.
    "I open my first job
      CALL FUNCTION 'JOB_OPEN' (OPEN job TOTO_STEP1)
        EXPORTING
          jobname          = w_JobName
        IMPORTING
          jobcount         = w_JobID
        EXCEPTIONS
          cant_create_job  = 1
          invalid_job_data = 2
          jobname_missing  = 3
          OTHERS           = 4.
    "We keep in memory first job IDs to close it at the end of the prg
      w_firstjobName = w_JobName.
      w_firstjobID = w_JobID.
    "imagine you do the bellow code in a loop and it makes several jobs TOTO_STEP2 TOTO_STEP3 TOTO_STEP4...
    ADD 1 TO w_StepCount.
    IF w_StepCount GT 250.
        "I call close job eatch time I reach 250 steps
         PERFORM fx_jobclose.
    ENDIF.
    submit RKGALKEUB to sap-spool and return
                                       without spool dynpro
                                       spool parameters print_parameters
                                            VIA JOB w_JobName NUMBER w_JobID
    "End of the programmI close the current Job and the first one :
    "Current
            CALL FUNCTION 'JOB_CLOSE'
              EXPORTING
                JOBCOUNT             = w_JobId
                JOBNAME              = w_JobName
                PREDJOB_CHECKSTAT    = 'X'
                PRED_JOBCOUNT        = w_oldJobId
                PRED_JOBNAME         = w_oldJobName.
    "First one + launch with STRIMMED
            CALL FUNCTION 'JOB_CLOSE'
            EXPORTING
              JOBCOUNT             = w_firstjobId
              JOBNAME              = w_firstjobName
              STRTIMMED            = 'X'
            EXCEPTIONS
              cant_start_immediate = 1
              invalid_startdate    = 2
              jobname_missing      = 3
              job_close_failed     = 4
              job_nosteps          = 5
              job_notex            = 6
              lock_failed          = 7
              OTHERS               = 8.
    *&      Form  fx_jobclose
    *       text
    FORM fx_jobclose.
      "Step to zero to do a new loop after this form
      w_StepCount = 0.
      DATA : w_job_released TYPE CHAR1.
      "If the flag IsFirst, we don't do nothing, because it's the first JOb, and it should not be closed
      IF w_IsFirst = 'X'.
        "Flag is set to blank
        w_IsFirst = ''.
      ELSE.
          "Else it mean we are closing a job with predecessor :
          CALL FUNCTION 'JOB_CLOSE'
            EXPORTING
              JOBCOUNT             = w_JobId
              JOBNAME              = w_JobName
              PREDJOB_CHECKSTAT    = 'X'
              PRED_JOBCOUNT        = w_oldJobId
              PRED_JOBNAME         = w_oldJobName
              "SDLSTRTDT            = sy-datum
              "SDLSTRTTM            = sy-timlo
            IMPORTING
              JOB_WAS_RELEASED = w_job_released.
      ENDIF.
      "Vars get the value of current job, witch will become the older one
      w_oldJobId = w_jobID.
      w_oldJobName = w_JobName.
    "I make the new TOTO_STEPX job name
      ADD 1 TO w_jobCount.
      w_jobCountC = w_jobCount.
      CONCATENATE pe_name '_STEPS' w_jobCountC INTO w_JobName.
      CONDENSE w_JobName NO-GAPS.
      "I open the new job
      CALL FUNCTION 'JOB_OPEN'
        EXPORTING
          jobname          = w_JobName
        IMPORTING
          jobcount         = w_JobId
        EXCEPTIONS
          cant_create_job  = 1
          invalid_job_data = 2
          jobname_missing  = 3
          OTHERS           = 4.
    ENDFORM.                    "fx_jobclose
    I hope my code is clear enought, I tried to delete the superfluities code.

  • How to trigger a Job on cancellation of another Job ?

    Hi Friends,
    I have a requirement stated as below.
    We need to trigger a Job (JobB) on cancellation of another Job (JobA). This needs to happen on a periodc basis.
    If JobA is success then we dont need to run JobB.
    Could you please let me know how to acive this.
    Regards,
    Ravi Kasnale

    Try this,
    goto SM36 & create a job say job name "Job_test"
    Define a Job Step,
    choose an ABAP program say Zjob_start
    before this step Write an ABAP program "Zjob_start" which can,
    check status of "JobA"
    Use FM's mentioned by other members in this post.
    Check the status of JobA
    If its cancelled start your new job.
    by some FM's  mentioned by other members in this post.
    The start conditions for Job_test should be "After Job"
    & mention JobA in the parameter unchecking the checkbox & finish.
    Try, this may work.

  • Redwood - Schedule a job dependant on another jobs completion?

    Hoping someone can help as documentation on Redwood seems to be very limited.
    We are currently running Redwood for the "Standard Jobs" without an issue, however we now have a requirement to start testing our batch schedule through Redwood and can't seem to figure out how to create jobs with dependencies on other job completions?
    Can anyone point us in the right direction?
    The other issue we have, is that we are unable to find an option to release a job based on an event trigger?
    Thanks a lot

    Hi Matthew,
    Jobs can be made dependant in two ways.
    1.     Using Job chains where you will be able to have multiple scripts (each script executes a step in multi step job) dependant on one other. (Documentation for the same is available in Redwood help with key word – ‘What is a job-chain’). In this case you will have one job chain with multiple scripts getting executed in a parallel or sequential way. Also it is possible to embed job chains in other job chain. You can take different actions based on output / processing state (completed, cancelled etc.) of previous script in Job chain.
    2.     Raising events by predecessor script which in turn triggers next script.
    First solution is more appropriate and used one.
    If you are talking about events in Redwood they can be raised and sensed by scripts and can be defined in script properties under node –wait Events & Raise events.
    Hope this helps.
    Regards
    Vithal

  • Who scheduled a job with service user

    Hi,
    In my one of the system one job is running with service user. As service user cannot log into system. One of the dialog user logged in to system and scheduled one job with service user. this job is running more than 2 months. Now we want to know who is that dialog user scheduled this job with service user.  I have checked in job details it is not showing dialog user who has sheduelded first time.
    Pls someone help me in this case.
    Kind regards,
    Ram
    <subject_modified>
    Use a proper subject
    Read the "Rules of Engagement"
    Edited by: Juan Reyes on Jul 1, 2009 10:25 AM

    Just check the job owner.... If the Owner is the service user then most likely the user was changed to service user after the job creation. Also be aware that some jobs are generated by the system.
    Regards
    Juan

  • SQL SERVER AGENT job dependent on another job

    Hi
    I have 2 Sql Server Agent jobs that run on a daily basis.
    One which is run first but is dependant on another job completing.
    The secone runs every 30 mins between 9:00am to 7:00pm.
    If my first Job hasn't run but the 2nd job does start running the 2nd job will fail.
    Is there away with SQL servent agent where if my first Job hasn't run  then don't run the 2nd job?
    Regards

    Hi aivoryuk,
    According to your description, if you set one job is dependent on another job, when the first job does not run or execute failed, then the second job will not run. I recommend you use two steps to instead of this two jobs. In step Advanced page, we can set
    that the first job execute successfully then go to the next step. Or else, it will quit the job and report a failure.
    The other way is that we create new job with the same schedule as the second job , in this job , we can check the first job status with the sp_help_job stored procedure, then you can use sp_start_job to Start
     the second job. For more information, you can review the following post.
    http://social.technet.microsoft.com/Forums/en-US/d5cb4004-02fb-4b41-a321-5197f8105941/sql-server-agent-making-1-job-dependent-on-another?forum=sqltools
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Job with Multiple Schedule of same time & only one is executed, Why

    Hi ALL,
    I've Created a package to notify report in email  as excel, which is using a path to render report and save it as excel.
    This package was need to be schedule every first day of month and on every Friday even at morning 7 AM.
    So logically these are two events.
    But if we see on 1 May 2015 we have Friday and plus first day of month
    So technically this should fail.
    either for IO operation for render &
    storing data over same location with same file name.
    To replicate this i created two three schedule
    Below is the job history, job is invoked by only one schedule
    Question-
    1) Why one one schedule execute?
    2) why "sched2" only , it could be "sched3" only or "DentalOperationStackAndRank-Sched1" Only?
    Another this i result into error if different job executing same package at same schedule.
    FYI- package is deployed at database level
    HS

    Hi HS,
    As described in this
    article, more than one job can run on the same schedule, and more than one schedule can apply to the same job.
    And I make a test about your scenario, when configuring a SQL Server job with three schedules that reference same dates and times, my job behaves as yours that only one schedule is executed, but the job is invoked by schedule2 or schedule 3 in my environment.
    It is a normal behavior of SQL Server job in my opinion. For more details about such scenario, you can track the job following this
    blog.
    However, when I configure three jobs that run on the same schedule, everything works well and the three jobs all run successfully.
     I recommend you configure three different jobs that execute same package at same schedule .
    Thanks,
    Lydia Zhang
    Lydia Zhang
    TechNet Community Support

  • How to schedule batch jobs to run after another periodically?

    Hi good people,
    I want to schedule batch jobs to run periodically one after another.
    Here is the problem:
    I have scheduled JOB1 to run once a week and I scheduled JOB2 to run after that job (JOB1). The problem is that JOB2 runs only after the first time that JOB1 runs. The second time the JOB1 runs the JOB2 is not started. I presume that the reason for that is that JOB2 is tied to the job number for the JOB1, and since a new job (with the new number) is created every week, the JOB2 is only tied to the first instance of JOB1.
    So does anyone have an idea how to get JOB2 to automatically run every week after JOB1? One idea is to use events, but that I'm hoping that there is a bit cleaner solution..
    Best Regards,
    Armin

    Hi
    Try scheduling both JOB1 & JOB2 in a single job in steps.
    First schedule JOB1 & then give JOB2 in steps.
    Kindly check the following link to do job scheduling in steps:
    http://help.sap.com/saphelp_47x200/helpdata/en/c4/3a7ed1505211d189550000e829fbbd/frameset.htm
    In the above help documentation, look for the topic <b>"job steps"</b> in
    "Background Processing: Concepts and Features"
    hope it helps!
    best regards,
    Thangesh

  • Schedule job with JOB_CLOSE until a certain time

    Hello all,
    I'd like to schedule a background job with JOB_CLOSE until a certain time, i.e. first start time at 10 a.m., repitition period 15 min., last start time 1 p.m.
    I tried this using parameter LASTSTRTTM, e.g.:
    i_startdate = sy-datum.
    i_starttime = '100000'.
    i_prdmins = '15'.
    i_laststrtdt = sy-datum.
    i_laststrttm = '130000'.
    CALL FUNCTION 'JOB_CLOSE'
        EXPORTING
          jobcount             = l_jobcount
          jobname              = 'MY_JOB'
          sdlstrtdt            = i_startdate
          sdlstrttm            = i_starttime
          laststrtdt           = i_laststrtdt
          laststrttm           = i_laststrttm
          prdmins              = i_prdmins
        EXCEPTIONS
          cant_start_immediate = 1
          invalid_startdate    = 2
          jobname_missing      = 3
          job_close_failed     = 4
          job_nosteps          = 5
          job_notex            = 6
          lock_failed          = 7
          OTHERS               = 8.
    but I didn't succeed - the job didn't stop at 1 p.m. Any hints?
    Best regards
    Martin Lehmann

    Hi Martin,
    i_startdate = sy-datum.  " 1st time Job Start Date
    i_starttime = '100000'.
    i_prdmins = '15'.
    i_laststrtdt = sy-datum.  " If Job is not started by this date, then it wont be started once this date is completed
    i_laststrttm = '130000'.
    What it means is, if i want to start a job by 10th Oct.. & expect that it should be started maximum by 20th Oct.. If its 20th Oct & still the job is not started,... then terminate the job & do not start it..
    If the job is already started, then it wont stop.
    Hope its clear.
    Best regards,
    Prashant

  • How to schedule job with spool list recipient in CPS ?

    Dear Guru,
    i import job with spool list recipient from r3 to cps and schedule in CPS, job is finished but there is no spool send to the recipient ?
    Please advise ?
    Best regards,
    Supat Jupraphat.

    What job definition did you use? SAP_AbapRun? SAP_AbapRunPrint? SAP_AbapRunPrintExt?
    Do you have XBP 2.0 or 3.0 in the SAP system? (check SE38 > INITXBP2)
    Have you loaded the CPS transport files in the SAP system?
    Note that using spoollist recipients either involves SAP_AbapRunPrintExt in combination with XBP3.0
    OR
    It involves SAP_AbapRun or SAP_AbapRunPrint and XBP 2.0 using transportation files in the SAP System.
    Please check the section of the CPS admin guide called: "Enhanced SAP Interfaces with Redwood Transports"
    Regards,
    David

  • Schedule background job with different user

    hi ,
    i want to schedule a background job under a different user
    i have used the parameter AUTHCKNAM of 'job_submit'
    it is giving sy-subrc = 0 .
    but it is not working
    i have also used the FM 'bp_job_create' in place of 'job_open'
    it is giving sy-subrc = 0 .
    but not working as needed
    kindly help
    regards...

    hi
    Try this
    We can do that via SUBMIT statement:
    Go through the documentation os SUBMIT statement with addition:
    ... USER user VIA JOB job NUMBER n
    Schedules the specified report in the job specified by the job name job and the job number n. The job runs under the user name user and you can omit the addition USER user. The assignment of the job number occurs via the function module JOB_OPEN (see also the documentation for the function modules JOB_CLOSE and JOB_SUBMIT). This addition can only be used with the addition ...AND RETURN.
    OR
    go through this link , i hope this ll help you to solve your problem
    http://help.sap.com/saphelp_nw2004s/helpdata/en/5f/ff2138faeb3807e10000009b38f889/content.htm
    Hope this helps.
    Thanks
    Tushar

  • Job submission failed : error occurred while scheduling the job. org.quartz.objectalreadyexistsexception: unable to store job with name

    Experts,
    Please help me out here,Am facing this issue while scheduling a job in BIPublisher.
    job submission failed : error occurred while scheduling the job. org.quartz.objectalreadyexistsexception: unable to store job with name
    Thanks,

    You are probably installing on a hardened machine.
    The "installation guide" says that if you are doing so, you need to create a file named libx11.so.4 and update your LD_LIBRARY_PATH (see http://docs.iplanet.com/docs/manuals/messaging/ims52/ig/unix/overview.htm)but:
    1- the library name is libX11.so.4 and
    2- for jre a common file is not enough, you need to install SUNWxwplt at least. This will install the library on /usr/openwin/lib.
    You can check the results running <server-root>/bin/base/jre/bin/jre
    Hope that helps and sorry about my poor english.

  • How can you get the schedule of a single reoccurring job with Restart ability in Redwood to pause when it has failed...?

    We need the Request Restart ability when scheduling a single reoccurring job in Redwood. Most of our jobs are scheduled in CHAINs which offers the Final Status Handler on Step level, and the schedule is "paused" when a job in the CHAIN has failed ( the next instance does not populate until the OP MSG has been Replied to) , and once the OPERATOR message is replied to, the CHAIN can resume running again ( desired ) . But we need this same ability when scheduling a single job not in a CHAIN. In our testing, we set up a job with Request Restart chosen on the Error , Killed and Unknown selections on the Restart Behavior Tab. But we found when a job is scheduled say once a day at 8AM, and when it fails, an OPERATOR msg appears allowing a Restart choice ( desired), but the next day's schedule also populates ( undesired) and we do NOT want the schedule to continue on yet because we need a chance to fix the error before the next insance runs for business reasons. So how can you get the schedule of a single reoccurring job with Restart ability in Redwood to pause when it has failed...?

    Hello Fran,
    You can wrap the job chain in a master job chain in the first step and set the final status handler there.
    You can also set the Restart Behavior to 'Stop Submit Frame', in that case you will have to resubmit the job once you are finished troubleshooting.
    Regards Gerben

  • Reports-Job-Scheduler: create job with startoption later: wrong date-format

    Hi,
    I test reports 11.1.1.2.0 (weblogic11 g) and try to start a report job with Reports-Job-Scheduler.
    Startoption: later and date = 09:48 Jan 12, 2010
    When I submit the job I get following Error:
    REP-50006: Das Argument SCHEDULE ist in der Befehlszeile ungültig: 09:48 Jän 12, 2010
    in english:
    Rep-50006: argument Schedule is wrong in command line: 09:48 Jän 12, 2010
    Why is Jän instead of Jan.
    When I start the report in February then it works.
    I defined also environment variables in basic configuration for the report server:
    NLS_DATE_FORMAT DD.MM.YYYY
    NLS_DATE_LANGUAGE GERMAN
    NLS_LANG GERMAN_GERMANY.WE8ISO8859P1
    I would be very pleased to get support.
    Many thanks
    Alois

    I created a SR and oracle support found a bug in EM.

  • Schedule a Job with multiple steps via ABAP Program

    Hi Friends,
    I want to create a report(Ex: ZREP) that will run another program(Ex: ZPGM) in background. What I need to do is, when I execute the report ZREP it should run the ZPGM automatically in background. This background execution should happen through JOB with multiple steps.
    Why i am mentioned steps is, i have 1000 records in ZTABLE and need to execute 100 records each in one step and need to proecess in ZPGM with selection parameters. So in my case my job should create with 10 steps and need to execute in sequential manner.
    FYI, In the ZREP selection screen i need to enter the records count/ interval to derive the job steps.
    Please guide how to go ahead? Thanks in advance for all the help.
    Regards,
    Raghu.

    Hi Raghu,
    You can try the following pieces of code:
    Loop at gt_table.   "This table contains 100 records previously appended
    w_jobname = c_job_emision   "Job Name.
        CALL FUNCTION 'JOB_OPEN'
          EXPORTING
            jobname          = w_jobname
          IMPORTING
            jobcount         = w_jobacount
          EXCEPTIONS
            cant_create_job  = 1
            invalid_job_data = 2
            jobname_missing  = 3
            OTHERS           = 4.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    * Perform or create T_SELTAB with parameters options
    PERFORM Create_seltab_table.
    *Call second program.
    SUBMIT ZREP WITH  SELECTION-TABLE t_seltab AND RETURN.
    *Close Job.
        CALL FUNCTION 'JOB_CLOSE'
          EXPORTING
            jobcount             = w_jobacount
            jobname              = w_jobname
            strtimmed            = c_x  "Immediate Start
         EXCEPTIONS
            cant_start_immediate = 1
            invalid_startdate    = 2
            jobname_missing      = 3
            job_close_failed     = 4
            job_nosteps          = 5
            job_notex            = 6
            lock_failed          = 7
            OTHERS               = 8.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    ENDLOOP.
    Hope this helps.
    Regards
    Ernesto
    PS: Raymond Giuseppi was faster.
    Edited by: Ernesto Caballero on Mar 10, 2010 1:57 PM

Maybe you are looking for

  • LINK TO GET DATA FROM Oracle9i Spatial

    Hi estimated friends In this moment I am carrying out some tests of functionality with Maps created in MapInfo to load them into Oracle9i Spatial. I have loaded data to Oracle from MapInfo without any trouble, when I do it the EasyLoader create a .ta

  • IPhone Wireless Synch

    I assume you will be able to synch the new 4s in the same manner using a usb cable.  The reason I ask is I can't quite wrap my head around how you could specify what to synch on the initial setup.  I have tons of apps and music on my computer but syn

  • Provide information about handling units

    Plz provide information about handling units. Explain all the paths and information about HU.

  • Deployejb and ejbdescriptor throws error

    I tried to deploy the ejb application to database using oracle tool deployejb at DOS prompt,, like this deployejb -republish -temp H:/myprojects/temp -user system - password aabbcc -service %ORACLE_SERVICE% -verbose -descriptor My8iEJB.ejb -generated

  • Lync trial and Active Directory changes

    Hi, I want to install a trial of  Lync server and when I install it says I need to prepare Active Directory I only want to test Lync but I do not want to make unnecessary permanant changes to Active Directory. Should I proceed with preparing Active D