Chaining job dependencies using Scheduler

While I see that one can assign Resource Groups to Job Classes for jobs running concurrently, is there a way to assure that one job task will not start up unless dependent jobs have finished?
What I want if for job_B to start only after job_A has finished. I do not want job_A to have to call job_B. I want there to be a tightness so that job_B will follow job_A either immediately or in a reasonable amount of time, but job_B will not fire if job_A is still running.
I can schedule job_A to run at the top of the hour. I can schedule job_B to run at 15 after the hour every 6th hour. I want to make sure however, that job_B will wait until job_A finishes in the event job_A takes longer than 14 minutes.
Does this functionality exist, or do I have to put a flag in some extra 'jobs_running' table for job_B to check, and then have it trigger job_B if it has checked, but could not run. It would be really nice if this were already built into the underlying DBA_ tables for Scheduler.
Please advise.
Thanks,
Scott Rappoport

Hi Sandy,
I am not sure what you mean but when you are on 11g you can schedule jobs to run in remote systems/databases. So I can imagine that the remote databases can be any edition, as long as you can connect to it. Maybe you should check the license information docs <http://download.oracle.com/docs/cd/E11882_01/license.112/e10594/toc.htm>
I hope this helps,
Ronald
http://ronr.blogspot.com

Similar Messages

  • Job Queues using Scheduler

    Hi,
    Can you please let us know whether we could create any job queues using Oracle Scheduler so that one job queue can be run with one license and another using a different license?
    Thanks,
    Sandeep.

    Hi Sandy,
    I am not sure what you mean but when you are on 11g you can schedule jobs to run in remote systems/databases. So I can imagine that the remote databases can be any edition, as long as you can connect to it. Maybe you should check the license information docs <http://download.oracle.com/docs/cd/E11882_01/license.112/e10594/toc.htm>
    I hope this helps,
    Ronald
    http://ronr.blogspot.com

  • Grafical overview of Job chains with dependencies by event

    Hi,
    we want to activate/monitor various process chains in APO and BW SAP systems which are dependent of each other.
    We intend to handle this with Events (wait events and raise events).
    For this reason we have created a job chain for each process chain. In the first and only step the job definition 'SAP_BW_ProcessChainRun' is started and activates the 'Technical Name of SAP BW Process Chain:
    Do we have a chance to get a graphical overview over all with event sceduling realized dependent job chains?
    Thanks
    Br
    Günter

    Hi,
    If there are dependencies between your BW Process Chains, you can use something like a master Job Chain definition in CPS to set up your dependencies between them (with failure or success outcomes, based on the step statuses). For chains that can run in parallel you can have multiple jobs (that can be other job chains) in a job chain step, and depedent jobs can be other steps that are triggered when a previous step completes / fails. Just check of course that thes jobs are your process chain jobs and not just event triggers.
    [link to SAP help for BW chains and CPS|http://help.sap.com/saphelp_nw04s/helpdata/de/bb/033b3c9f8c4b5ca34045688c6a9f7b/content.htm]

  • RSPC_LOG_DELETE unscheduled Process Chain Jobs????!!!

    Hi, I executed RSPC_LOG_DELETE for the 1st time in my DEV and QA Systems and it looks like it somehow unscheduled my Process Chain Jobs!  Has anyone else experienced this or know why this would have happened?  
    It is a good thing I did not run this in my production system thinking it was an innocent program that would just clean up my logs.
    We executed it manually and used a date to leave the most current 3 months of logs.
    Thanks for any helps!

    Hi,
    When you run the program, RSPC_LOG_DELETE, it deactivates teh steps in the process chain. if it is deactivatiing the start variant of the PC, tehn it means , the PC will be descheduled.
    So, whenever you run this innocent program, it will happen, and you have to actioate and schedule your process chains
    Hope this helps
    Shilpa

  • Running 2 dependent jobs on different schedules

    Dear all,
    I have the following problem:
    Job1 (a chain running external jobs) runs one per day at 08:00
    Job2 (a chain running external jobs) is dependent upon job1 completing and runs cyclically every 10 minutes.
    I have attempted to use scheduler events but this only runs the first instanceof job2. The next instance sits there in a not started state waiting for the next event trigger (which will not happen until the next day).
    I don't think I can combine the jobs and schedules and creating new procedures to accomodate this is an unwanted overhead.
    I have created a workable solution using conditional sql syntax in the start rule condition of the job2 chain using data held in the all_scheduler_jobs table but I don't really think the logs were created for such a use. The conditional sql used in the rule of step 1 of job2 is:
    (SELECT COUNT(*) FROM all_scheduler_jobs WHERE owner = <job_owner>'' AND job_name = ''<job_name>'' AND state = ''COMPLETED'' AND TRUNC((SELECT MAX(last_start_date) FROM all_scheduler_jobs WHERE owner = '<job_owner>'' AND job_name = '<job_name>'' AND state = 'COMPLETED')) = TRUNC(systimestamp) ) = 1
    Does anyone have any alternative solutions for sucha a schedule ? Any help would be appreciated.
    Thanks

    Hi,
    If I am understanding you correctly job2 should run ecvery 10 minutes and additionally run when job1 completes .
    I would recommend splitting this up into 2 jobs - job2a and job2b . Have job2a run every 10 minutes and job2b run when job1 completes.
    Here is sample code you can use to have job2b run when job1 completes (replace the job action and type with your chain)
    Hope this helps,
    Ravi.
    -- create a table for output
    create table job_output (log_date timestamp with time zone,
    output varchar2(4000));
    -- add an event queue subscriber for this user's messages
    exec dbms_scheduler.add_event_queue_subscriber('myagent')
    -- create the first job and have it raise an event whenever it completes
    -- (succeeds, fails or stops)
    begin
    dbms_scheduler.create_job
    ( 'first_job', job_action =>
    'insert into job_output values(systimestamp, ''first job runs'');',
    job_type => 'plsql_block',
    enabled => false, repeat_interval=>'freq=secondly;interval=30' ) ;
    dbms_scheduler.set_attribute ( 'first_job' , 'max_runs' , 2);
    dbms_scheduler.set_attribute
    ( 'first_job' , 'raise_events' , dbms_scheduler.job_run_completed);
    end;
    -- create a simple second job that runs after the first has completed
    begin
    dbms_scheduler.create_job('second_job',
    job_type=>'plsql_block',
    job_action=>
    'insert into job_output values(systimestamp, ''second job runs'');',
    event_condition =>
    'tab.user_data.object_name = ''FIRST_JOB''',
    queue_spec =>'sys.scheduler$_event_queue,myagent',
    enabled=>true);
    end;
    -- enable the first job so it starts running
    exec dbms_scheduler.enable('first_job')
    -- wait until the first job has run twice
    exec dbms_lock.sleep(60)
    select * from job_output;

  • Destination disabled. []: [CrystalEnterprise.Ftp]. Please note the name of the job server used for your request and contact your system administrator to make sure the specified destination is enabled. (FWB 00031)

    Hi
    In BO 4.0 SP 9 when a administrator tries to schedule a report via CMC there is no error
    But when a user schedules a report and the destination is FTP location -> Use default settings he gets following error
    Destination disabled. []: [CrystalEnterprise.Ftp]. Please note the name of the job server used for your request and contact your system administrator to make sure the specified destination is enabled. (FWB 00031)
    There is only one Job Server and the destinations are enabled in it
    There is no Job server for Crystal Reports Job Server
    Do i need to create it and how.

    Please check if you have proper rights to schedule to FTP. You can create a new job server, whenever you schedule it, there are multiple job servers, it will handle based on the load. But it is not mandatory, depends on the load.

  • How to stop a running job in 10g Scheduler?

    The following is a duplicate post. I posted the following to the general database forum before seeing that otn has a new scheduler forum:
    I am not able to find in the Admin Guide a method to stop a currently running instance of a job in the 10g scheduler.
    In 9i, I run the following script calling DBMS_JOB.broken and DBMS_JOB.remove to shut down currently running jobs:
    DECLARE
    jobid NUMBER;
    CURSOR c1
    IS
    SELECT job
    FROM dba_jobs
    WHERE priv_user = 'ME';
    BEGIN
    OPEN c1;
    LOOP
    FETCH c1
    INTO jobid;
    EXIT WHEN c1%NOTFOUND;
    DBMS_JOB.broken (jobid, TRUE);
    COMMIT;
    DBMS_JOB.remove (jobid);
    COMMIT;
    END LOOP;
    CLOSE c1;
    END;
    How may I create similar code to shut down currently running jobs using DBMS_SCHEDULER in 10g? According to the Admin Guide, disabling jobs with the force option will still allow the job to finish.
    How can I terminate a running job in 10g?

    You can stop a currently running job using the STOP_JOB api.
    STOP_JOB Procedure
    This procedure stops currently running jobs or all jobs in a job class. Any instance of the job will be stopped. After stopping the job, the state of a one-time job will be set to SUCCEEDED whereas the state of a repeating job will be set to SCHEDULED or COMPLETED depending on whether the next run of the job is scheduled.
    Syntax
    DBMS_SCHEDULER.STOP_JOB (
    job_name IN VARCHAR2
    force IN BOOLEAN DEFAULT FALSE);
    Parameters
    Table 83-44 STOP_JOB Procedure Parameters
    Parameter Description
    job_name
    The name of the job or job class. Can be a comma-delimited list. For a job class, the SYS schema should be specified.
    If the name of a job class is specified, the jobs that belong to that job class are stopped. The job class is not affected by this call.
    force
    If force is set to FALSE, the Scheduler tries to gracefully stop the job using an interrupt mechanism. This method gives control back to the slave process, which can update the status of the job in the job queue to stopped. If this fails, an error is returned.
    If force is set to TRUE, the Scheduler will immediately terminate the job slave. Oracle recommends that STOP_JOB with force set to TRUE be used only after a STOP_JOB with force set to FALSE has failed.
    Use of the force option requires the MANAGE SCHEDULER system privilege.
    Setting force to TRUE is not supported for jobs of type executable.
    Usage Notes
    STOP_JOB without the force option requires that you be the owner of the job or have ALTER privileges on that job. You can also stop a job if you have the CREATE ANY JOB or MANAGE SCHEDULER privilege.
    STOP_JOB with the force option requires that have the MANAGE SCHEDULER privilege.

  • Email multiple spools from background job - SM36 using Spool List recipient

    I create a background job using Spool List Recipient to email me the reports. The program that I scheduled to run creates 2 spools. When the spools are sent via email, only the last spool is sent.
    Please advise on how I can get the 2 spools sent via email.

    i would not use the Spool List recipient from Job and use the function RSPO_SPOOLJOB_TO_OFFICE in your Program instead.
    tell me if it helps.
    Regards,
    Laurent

  • How to manage cross-schema job dependencies?

    Hello.
    I know how to set up a job schedule where one job triggers another job in the same schema, using the
    <pre> raise_events</pre>
    attribute on the first job, then using the
    <pre> event_condition, queue_spec</pre>
    attributes on the triggered job with a condition along the lines of
    <pre> tab.user_data.object_name = '<jobname>' AND tab.user_data.event_type = 'JOB_SUCCEEDED'</pre>
    Is there a way of triggering a job in a different schema?
    Many thanks,
    Clark.

    Jobs created in what version of hte product?
    Jobs created using DBMS_JOB or DBMS_SCHEDULER or part of DBMS_AUTO_TASK?
    If you have properly set up object permission and synonyms why does it matter and why are the jobs in separate schemas?

  • 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

  • BACKGROUND JOB WAS NOT SCHEDULED/LOG FILE NOT YET GENERATED

    Hello,
    To generate the log report, /VIRSA/ZVFATBAK program is scheduled on hourly basis but some time report doesn't get generated and if we see the background job then it shows sucessfully finished.
    If we see the maually the log report for FFID then below error message is displayed.
    " BACKGROUND JOB WAS NOT SCHEDULED/LOG FILE NOT YET GENERATED"
    Can anyone guide me to solve the issue.
    Thanks in advance.
    Best Regards,
    Prashant Dubey

    Hi,
    once chk the status of the job by selecting that and check job status(cltr+shift_f12)
    since it was periodically scheduled job there will be a RELEASED job after every active job..
    so try to copy that into another job using copy option and give some new name which u have to remember...
    the moment u copy u can find the same copied job in SCHEDULED status...
    from here, try to run it again on hourly basis....
    After copying the job u can unschedule the old released job to scheduled otherwise 2 will run at a time...
    rgds,

  • What time will a job run using only REPEAT_INTERVAL of FREQ=DAILY

    What time will a job run using only a Schedule REPEAT_INTERVAL of FREQ=DAILY?

    Hi,
    There are two cases
    - if you set a start time it will run at the hour and minute of the specified start date
    - if start_date is left as NULL then it will run as soon as it is enabled (or at create time if enabled is true) and thereafter at the hour and minute when it was enabled.
    Basically it makes the best attempt to run at the same time every day which is either the start_date or the enable time.
    Hope this helps,
    Ravi.

  • Removing the "target server" from process chain jobs

    Dear SAP Community,
    Please note we are on BW version 3.5
    We have a very large number of process chains that are used to load data in the production environment. Many of those process chains have a "target server" specified, so that the jobs will run only on the central instance.
    A new application server has just been added to the environment, and we want to remove the "target server" definition so that the dispatcher will be free to load balance the process chain jobs.
    We can see the attributes for each process chain are stored in a table called RSPCCHAINATTR.
    Please let me know: can we update the value of field SERVER in table RSPCCHAINATTR, to set it to blank using SQL-PLUS ?
    And then can we run a /$sync to bring these changes up into the application layer ?
    This would save tons of time & manual effort, and it would set the target server to blank for all of the process chains at once, instead of clicking manually so many times to clear the value for each process chain.
    Please let me know if we can take this approach ? Is there any chance of the process chains becoming inactive by doing this ?
    We want to set the "target server" = blank in all cases, instead of manually clicking into each and every process chain.
    Please let me know, thanks.
    Keith Helfrich
    Edited by: Keith Helfrich on Aug 17, 2010 11:45 AM

    Check tcode RSBATCH, If I'm not wrong all process types are assigned to central server. Remove that server name and save.
    Now, If u execute process chain, system will prompt you assign server/host name. To skip this follow the below.
    Again use RSBATCH, under 'Background and Parallel Processes' tab, click 'Switch Off F4 Popup for Server/Host/Group', enter * (star) under Users for 'Users for Whom NO Server/Host/Group Popup Should be Processed'.
    Now, If u execute process chain, it should run on either of servers.
    Since u added Appln Server, best bet would be creating a server group. See the below link.
    How to run Process Chain jobs WITHOUT a target server

  • Process Chain Jobs

    Dear All,
    We run our Process Chain Daily 3 times. but we found that on R/3 side our BW Process Chain jobs gets bydefault Job Catagory as 'C' due to other load on R/3 our jobs are placed in 'Released' if we make it as 'A' jobs get Active is there any option to make BW Process Chain Jobs bydefault Jab Class 'A'?
    Regards,
    Omkar

    Hi Friend,
    let me know , whether the jobs are V3 or what in R/3. if the jobs are V3 , as per schedule these will run in R/3 side.
    as per me, when the process chain start in BW side, it send a request to start extraction job in R/3
    if the PC triggers by any job from R/3, once the job completed in the R/3 it will shows as completed and it will be scheduled/release state for the next run.(as per the schedule)
    i think no need to make it as C / A.
    let me know, what exactly u r facing the problem
    i hope it will help you
    regards.
    Rambabu

  • Creating Job material using public API from WIP

    Take the entered component part number and search in the WIP job material requirements. This should use a WIP API. If the material is found, increment the quantity. If material is not found, create the job material using public API. (Provide WIP API details)
    The java object, oracle.apps.csd.schema.server .CsdHvWipJobPvtEO is a wrapper to call WIP API. This should be used to create material requirements is this the procedure to create job material Req.
    from OAF how we have to create Job material transaction

    Hi Pat,
    What is your SBO version? I've seen several cases in which the login/connection procedure (both in the client and via DI API) has become much slower after upgrading to SBO 2005.
    Do you experience the same slowness when connecting via DI API in a non-WebService setting?
    I would not recommend using DI API in a web service context in the first place. DI Server would give you a much more robust, stable and scalable infrastructure to build upon.
    Henry

Maybe you are looking for