Job dependency **** urgent

Hi All,
I need a help immediately .
job definition is needs to be run on hourly basis from morning 6AM to 18 GMT.
Once the job which is scheduled at 18 got completed , another job definition needs to run , if the job which is scheduled at 18 not completed the job no need to run .
in case if i put in the job chain how we can do this ?
Thanks
Ramkumar

1) Create a timewindow restricting the time from 06 to 18 hrs
submit the job1 with the hourly submit frames.
2) between job1 and job2 create a job lock
Under definitions you will see locks in the name field give some appropriate name and save it.
in job1 and job2 add this lock
this lock will make sure that these 2 jobs donot step on each other when job1 is running and if job2 is scheduled inbetween
job2 will wait until job1 completes and then start running. vice-versa is also true.
3) Schedule job2 at 18:00 hrs
hope this is clear
As per the above scenario the job2 should be schedueld at 18:00 what happen's if the job is scheduled at 17 :00 ?
Will the second job wait for the completion of the job 1 or the job 2 will start running at 17:00 ?
Thanks
Ram

Similar Messages

  • Hi Everyone, i lost my KN presentation that i spent a day with my boss to finish it. I lost it by mistakenly shutting down my Macbook pro. Can anyone please tell me how to recover the files back as i'm really2 in trouble and my job depends on it...

    Hi Everyone,
    I lost my KN presentation that i spent a day with my boss to finish it. I lost it by mistakenly shutting down my Macbook pro. Can anyone please tell me how to recover the files back as i'm really2 in trouble and my job depends on it...
    hmmm...how i hate myself for being such a careless person...
    PLEASE HELP ME...
    Thank you in advance.
    Keynotes '09
    Version 5.1.1 (1034)

    How exactly did you shut down your laptop? Not a hard restart (holding down the power button), I hope... if that's the case, then it is extremely unlikely the file is still intact on your computer. If it is, it would be an image on your RAM, and it is time-and-resource-intensive to recover it if it is even there. RAM memory is disposable and always being written over. Sorry dude...
    If it wasn't a hard restart, Keynote should have made a backup, unless you 'Force Close'd it.
    It really all depends on how your mac was shut down.

  • 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

  • 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

  • Code to make second job dependent at first

    Hello experts, how can I write an ABAP code to kick of an event after the first step, and make the second job dependent on the event. thanks a lot...

    Hi christopher,
    1. Simple
      use like below when writing code FOR SECOND JOB
      where ;
      jobname = 1st jobname
      jobcount  =1st job count
    2.
    Data Declaration
      DATA : eventparm LIKE tbtcjob-eventparm.
      eventparm = jobname.
      eventparm+32 = jobcount.
      CALL FUNCTION 'JOB_CLOSE'
        EXPORTING
          jobcount                          = jobcount_sen
          jobname                           = jobname_sen
          predjob_checkstat                 = ''
          event_id                          = 'SAP_END_OF_JOB'
          event_param                       = eventparm
    regards,
    amit .

  • Scheduling a background job depending on the output lenght.

    Hi every one,
    I have a small requirement. My client want me to run a program in a foreground if the output is small and should the program in background if the output is large.This has to be achieved through coding. The program downloads the netprices of products. The downloaded file is of .dat format. It is an urgent requirement.
    Guys you would throughly rewarded for your help.
    Thanks,
    Kumar.9886185040.

    Hi Nag
    that is not possible with codeing. To create a schedule a background job for the same program depending on its output is not possible.
    being a programmer you need to decide, how long the code will take to execute.. accordingly you can either schedule or run in foreground. You can make some mandatory fields in the selection screen, so that the output is big mostly.
    see the sample code for the Job scheduling using the fun modules
    IF p_bjob = 'X'.
    CONCATENATE sy-cprog sy-datum sy-uzeit
    INTO jobname SEPARATED BY '_'.
    CALL FUNCTION 'JOB_OPEN'
    EXPORTING
    jobname = jobname
    IMPORTING
    jobcount = jobcount
    EXCEPTIONS
    cant_create_job = 1
    invalid_job_data = 2
    jobname_missing = 3
    OTHERS = 4.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
    IMPORTING
    out_archive_parameters = arc_params
    out_parameters = print_params
    valid = valid
    EXCEPTIONS
    archive_info_not_found = 1
    invalid_print_params = 2
    invalid_archive_params = 3
    OTHERS = 4.
    IF valid = chk.
    SUBMIT yREP WITH s_kunnr IN s_cust
    AND RETURN
    USER sy-uname
    VIA JOB jobname
    NUMBER jobcount
    TO SAP-SPOOL
    SPOOL PARAMETERS print_params
    ARCHIVE PARAMETERS arc_params
    WITHOUT SPOOL DYNPRO.
    CALL FUNCTION 'JOB_CLOSE'
    EXPORTING
    jobcount = jobcount
    jobname = jobname
    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
    invalid_target = 8
    OTHERS = 9.
    IF sy-subrc 0.
    * MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    * WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ELSE.
    MESSAGE i029 WITH jobname.
    ENDIF.
    ELSE.
    MESSAGE s000 WITH text-003.
    STOP.
    ENDIF.
    ENDIF.
    Also,
    Yes you can use job functions:
    JOB_OPEN
    JOB_SUBMIT
    JOB_CLOSE
    * You can add multiple steps into one job by using JOB_SUBMIT.
    Regards
    JJ

  • Back ground job scheduling(urgent)

    Hi all,
      can anybody will help me ,regarding the step by step procedure to schedule the background job.
    i have to do back ground job scheduling for one program so that in that specified time my report will execute?
    plz suggest.
    ur idea will be highly appreaciated.
    Regards
    pabitra

    HI
      Please follow the below steps to schedule a background job.
    First - create a Report-Variant for your print programm using the SE38.
    Then...
    1.) Call the transaction SM36
    Enter a Job Name / You may set a job class other
    than 'C' (See online Help on that field).
    2.) Push the STEP Button
    3.) Push the ABAP Program button
    Enter der programm name an the variant name
    save that window
    4.) Push "BACK"
    5.) Push "Start Condition"
    6.) Push Date/Time
    Enter Date + Time for the first start
    Mark "Periodic Job" !!
    7.) Push "Period Values"
    Set the period you want the job to be started
    Save everything
      For more info please refer to this link:
    <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/c4/3a7ed1505211d189550000e829fbbd/content.htm">Background Processing</a>
    Kind Regards
    Eswar

  • Creating thousands of jobs dependent on completion event of subsequent job

    Hello,
    I am using DBMS_SCHEDULER.CREATE_JOB.
    I am seeing a substantial degradation in the number of jobs I can create per second. I have a queue of jobs that run in sucession. Initially I can create around 5 per second and after 1000 jobs have been created, I am only creating 1 per 25 seconds.
    Is this expected behavior? If so, why?
    Thanks,
    Dianna

    Ravi,
    I have not used the ADDM to examine this.
    I did create a test case that isolates this simply down to calling CREATE_JOB. Here is the code. You can just replace my job_action with a job that you know will run for a long time or sleep for a few hours [my jobs run about 6-7 hours]. Only the first job runs while I am testing this. The other jobs are waiting on completion events of prior jobs.
    Because I am naming the jobs with the HH_MI_SS, you can quickly see that the time it takes to create jobs becomes longer and longer.
    Thanks,
    Dianna
    CREATE or replace PROCEDURE schedule_many_jobs (
    recent_tf IN NUMBER,--This is just a parameter to my job
    nbr_of_prior_months IN NUMBER, --This determines my number of jobs
    remove_old_jobs IN NUMBER DEFAULT 0 --If this is 1, it will remove old jobs with the same name, handy to clean out your Scheduler after you run this
    AS
    job_prefix VARCHAR2 (18);
    u_job_name VARCHAR2 (25);
    previous_job_name VARCHAR2 (25);
    this_month DATE;
    aa_subscriber_exists EXCEPTION;
    PRAGMA EXCEPTION_INIT (aa_subscriber_exists, -24034);
    BEGIN
    IF remove_old_jobs = 1
    THEN
    FOR c IN (SELECT job_name
    FROM user_scheduler_jobs
    WHERE job_name LIKE 'TEST_DGW%')
    LOOP
    DBMS_SCHEDULER.drop_job (c.job_name, TRUE);
    END LOOP;
    END IF;
    BEGIN
    DBMS_SCHEDULER.add_event_queue_subscriber ('AD');
    EXCEPTION
    WHEN aa_subscriber_exists
    THEN
    NULL;
    WHEN OTHERS
    THEN
    aaadmin.aa_common_pkg.aalogger ('AADMS', 'Historical DMS creating event queue subscriber: ', 'ERROR');
    END;
    job_prefix := 'TEST_DGW' || TO_CHAR (SYSDATE,'HH_MI_SS') || '_';
    u_job_name := DBMS_SCHEDULER.generate_job_name (job_prefix);
    previous_job_name := u_job_name;
    DBMS_SCHEDULER.create_job
    (job_name => u_job_name,
    job_type => 'PLSQL_BLOCK',
    job_action => 'BEGIN aa_dms.aa_dms_historical_update('
    || TO_CHAR (recent_tf)
    || '); END;',
    enabled => TRUE
    DBMS_SCHEDULER.set_attribute (NAME => u_job_name,
    ATTRIBUTE => 'raise_events',
    VALUE => DBMS_SCHEDULER.job_run_completed
    DBMS_SCHEDULER.set_attribute (NAME => u_job_name,
    ATTRIBUTE => 'restartable',
    VALUE => TRUE
    FOR i IN 1 .. nbr_of_prior_months
    LOOP
    previous_job_name := u_job_name;
    --this_month := recent_tf;
    job_prefix := 'TEST_DGW' ||TO_CHAR (SYSDATE,'HH_MI_SS') || '_';
    u_job_name := DBMS_SCHEDULER.generate_job_name (job_prefix);
    DBMS_SCHEDULER.create_job
    (job_name => u_job_name,
    job_type => 'PLSQL_BLOCK',
    job_action => 'BEGIN aa_dms.aa_dms_historical_update('
    || recent_tf
    || '); END;',
    event_condition => 'tab.user_data.object_name ='''
    || previous_job_name
    || '''',
    queue_spec => 'sys.scheduler$_event_queue,AD',
    auto_drop => TRUE,
    enabled => TRUE
    DBMS_SCHEDULER.set_attribute
    (NAME => u_job_name,
    ATTRIBUTE => 'raise_events',
    VALUE => DBMS_SCHEDULER.job_run_completed
    DBMS_SCHEDULER.set_attribute (NAME => u_job_name,
    ATTRIBUTE => 'restartable',
    VALUE => TRUE
    END LOOP;
    END schedule_many_jobs;

  • Inter Job Dependency

    Hi Experts,
    Could anyone helpout with the following issue
    I have two Jobs, JOB1 and JOB2. I want JOB2 to run only when JOB1 is successfull , how can this be achieved in BODS 3.0, and if JOB1 fails, then JOB2 shouldnt run.
    Thanks in Advance
    Santosh.

    you can export the batch job execution command from Management Console. This will export the command to the bat file in %LINK_DIR%\log directory with the name of the job
    you can call these 2 jobs in another script, in which you can check the status of the first command and based on that decide to execute the second job
    or In the first job add a DI script at the end and in that script you can call the bat file for the second job using the exec function
    exec('C:
    job_scripts
    job2.bat', '' ,0);

  • Alias to iView and portal menu dependency - urgent

    Hello All
    I've created iView for WDJ application, and given it alias, so it can be accesed via https://my.portal.com/irj/portal/MyAppAlias. It works ok, but I'd like to open this app with portal menus (those, which normally lead to this app) to be highlighted and open just like in case when user clicks it. Menu is simple, top tab is role, then upper menu from workset and iView gives left panel menu to clik.
    Is it possible to access application directly keeping menus properly handled?
    Best regards
    Thanks in advance
    Maciej Gottfried

    Hi Maciej,
    You can create an iView from this application ,put it in any structure you want inside a role.
    Then configure this iView property "quicklink" to the alias you want, for instance "MyAppAlias".
    Afterwards when you type in the url: https://my.portal.com/irj/portal/MyAppAlias you would be navigated and see the app in the content area and TLN and DTN panel showing the exact structure where this iView is located.
    more details on quick links:
    http://help.sap.com/saphelp_nw73/helpdata/en/49/3e2a1129002221e10000000a42189d/content.htm?frameset=/en/49/3d203a13301ec6e10000000a42189b/frameset.htm
    Best Regards,
    Tal

  • How to schedule dependent job in oracle

    I would like to schedule a job which should be dependent on the completion of previous job. How is it achieved in oracle 10g

    refer to this examples about DBMS_SCHEDULER.CREATE_CHAIN to form job dependency.

  • How to make sub programs dependent on the parent program for ESS job in Fusion Applications.

    Hi Experts,
    We have a requirment to define the ESS jobs dependent on the parent program.
    Example:
    ESS_JOB_PARENT   -- Main ESS jobs which will trigger below mentioned jobs using "ess_runtime.submit_subrequest" through PL/SQL Package.
    ESS_JOB1                 -- Parent program has to wait will ESS_JOB1 is completed. If ESS_JOB1 is errored then parent program should also be errored.
    ESS_JOB2                 -- If ESS_JOB1 is successfull then Parent program should trigger ESS_JOB2 and it has to wait till ESS_JOB2 is completed. If ESS_JOB2 is error parent program should be errored.
    ESS_JOB3                 -- If ESS_JOB2 is completed successfully then parent program should trigger ESS_JOB3 and it has to wait till ESS_JOB3 is completed. If ESS_JOB3 is error then parent program should be errored.
    Any reference (document or sample code) are highly appericiated.
    Thanks,
    Praveen

    Is there a reason why "Job Set Steps" cannot be used, that is is there a reason you need to do this programmatically ?
    Jani Rautiainen
    Fusion Applications Developer Relations
    https://blogs.oracle.com/fadevrel/

  • Job execution depend on more than one event

    Hi gurus,
    Does anybody know if there is some way to execute a JOB dependent of more than one event raised?
    I have a JOB that need to be executed only when two events are raised.
    I have created those events using tCode SM62.
    Thanks in advance,
    Silvio Messias

    These more complex dependencies cannot be realised in the SAP standard (as far as I know), I assume the events could come in any order, so I have a hard time thinking about a workaround.
    You probably need external scheduling software (like TWS or Batchman), or program your own add-on solution.
    Thomas

  • How to cancel the background job processing in ABAP programming?

    Hi,
    I have a requirement where i need to cancel the job depending on some constraint. My code is something like this:
    Select some data from the table.
    if sy-subrc = 0.
    Do nothing.
    Else
    Cancel the job
    call function 'BP_JOB_ABORT'
      exporting
       jobcount                         = number
        jobname                          = name
    EXCEPTIONS
       CHECKING_OF_JOB_HAS_FAILED       = 1
       JOB_ABORT_HAS_FAILED             = 2
       JOB_DOES_NOT_EXIST               = 3
       JOB_IS_NOT_ACTIVE                = 4
       NO_ABORT_PRIVILEGE_GIVEN         = 5
       OTHERS                           = 6
    The above code is cancelling the job but it is throwing an exception called CX_SY_DYN_CALL_PARAM_MISSING because i dint pass job count. How can we find the job count of next job that is going to run? Or How to handle the exception which it is throwing. Even if i try to handle that exception something like this:
    TRY
    call function 'BP_JOB_ABORT'
      exporting
       jobcount                         = number
        jobname                          = name
    EXCEPTIONS
       CHECKING_OF_JOB_HAS_FAILED       = 1
       JOB_ABORT_HAS_FAILED             = 2
       JOB_DOES_NOT_EXIST               = 3
       JOB_IS_NOT_ACTIVE                = 4
       NO_ABORT_PRIVILEGE_GIVEN         = 5
       OTHERS                           = 6
    RAISE EXCEPTION TYPE CX_SY_DYN_CALL_PARAM_MISSING.
    CATCH
    CX_SY_DYN_CALL_PARAM_MISSING.
    ENDTRY.
    It avoids the exception but it doesnt cancel the job.  I even tried with function modules like JOB_OPEN
    JOB_SUBMIT,BP_JOB_SELECT,BP_JOB_ABORT and tried to build some logic using status overview table (TBTCO) and TBTCP (Jobstep overview table).
    Can someone suggest me the right way to write this program ?
    Thanks in advance.
    Rashmi

    Hi,
    Problem is solved.
    Create an background job with 2 steps. The first step in the background job calls the program ZBACKJOB_STEP1.  In the variant we have a wrong material number
    If the material number is not found in Mara, the next step in the job should not get executed and the job should get cancelled..
    In the above posts i had asked how do I get the job count of the job that is currently triggering the program at the runtimeu2026..If u see the below code uu2019ll get to know.. We have to use the standard structure TBTCM which captures the properties/characteristics of the job.
    REPORT ZBACKJOB_STEP1.
    TABLES: MARA,TBTCM.
    PARAMETERS : MATNR TYPE MATNR.
    START-OF-SELECTION.
      SELECT SINGLE * FROM MARA WHERE MATNR = MATNR.
      IF SY-SUBRC IS INITIAL.
        WRITE / : 'This is the material selected on the selection-screen' , MARA-MATNR.
    ELSE.
            CALL FUNCTION 'GET_JOB_RUNTIME_INFO'
          IMPORTING
            EVENTID                                    = TBTCM-EVENTID
            EVENTPARM                             = TBTCM-EVENTPARM
            EXTERNAL_PROGRAM_ACTIVE = TBTCM-XPGACTIVE
            JOBCOUNT                                = TBTCM-JOBCOUNT
            JOBNAME                                  = TBTCM-JOBNAME
            STEPCOUNT                              = TBTCM-STEPCOUNT
          EXCEPTIONS
            NO_RUNTIME_INFO                    = 1
            OTHERS                                     = 2.
        IF SY-SUBRC = 0.
          CALL FUNCTION 'BP_JOB_ABORT'
            EXPORTING
              JOBCOUNT                                     = TBTCM-JOBCOUNT
              JOBNAME                                       = TBTCM-JOBNAME
            EXCEPTIONS
              CHECKING_OF_JOB_HAS_FAILED  = 1
              JOB_ABORT_HAS_FAILED              = 2
              JOB_DOES_NOT_EXIST                   = 3
              JOB_IS_NOT_ACTIVE                      = 4
              NO_ABORT_PRIVILEGE_GIVEN       = 5
              OTHERS                                         = 6.
          IF SY-SUBRC <> 0.
          ENDIF.
        ENDIF.
      ENDIF.
    Regards,
    Rashmi

  • Back Ground Jobs for ESS/MSS

    Hi,
    I would like to know all the back ground jobs to be scheduled for ESS/MSS.
    As all the data updated in the portal as to reflect in r/3 system and all the data updated in r/3 system to portal.
    Regards
    Vish

    You need to set the background jobs depending on the functionality which is being implemented and what the data ?
    for eg: if it's leave request there background jos which needs to scheduled
    RPTARQEMAIL (Leave Requests: Send E-Mails)
    RPTARQPOST (Leave Requests: Post)
    RPTARQSTOPWF (Leave Requests: Complete Current Workflows)
    hope this would help you..

Maybe you are looking for