Job with multiple event schedules

Is it possible to create a job with multiple schedules? Can you have multiple schedule names?
DBMS_SCHEDULER.CREATE_JOB (
job_name => 'my_new_job2',
job_type => 'PLSQL_BLOCK',
job_action => 'BEGIN SALES_PKG.UPDATE_SALES_SUMMARY; END;',
schedule_name => 'my_saved_schedule, my_saved_schedule2'); <------------------ like this?
END;
thanks.

I am using oracle 10g and have installed the file arrival package. I want my job to run when multiple files arrive. I have created the file arrival event schedules. I know i can create chain event steps to respond, but my chain has to be running for the steps to respond to the events. I want the chain (or rather the job that starts the chain) to kick off when 2 or more files arrive.
thanks.

Similar Messages

  • 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

  • Job with multiple variant

    Dear Friends,
    I have some jobs which has many variants. So it possible to create a job with multiple variants or only option is to create job chain.
    Please suggest.
    Thanks in advance.
    Regards,
    Jiggi

    Hi,
    You can submit the same job with different variant, but that is your runtime.
    Limitation is that you can't migrate all these runtime jobs.
    It is better you create different jobs with different variants, so that you have frexibility to run them independently, monitor and troubleshoot them, also migrate them to next environment (QA or PRD). And you can still create a job chain using all these independent jobs if require.
    Only creating Job Chain would be useful only if you want to run them in parallel or in sequence. (Not if you want to run them independently).
    Hope this help.
    regards,
    Sunil Rohit

  • 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

  • Defining Job with multiple steps

    This is a general question on SM36.
    I have 4 programs that need to run as part of a job. I do not want this as a periodic job because these 4 steps needs to be done by the user when needed.
    I defined a job and created 4 steps and saved. system showed the job is scheduled and then I released it. All the 4 steps ran successfully.
    Now if I want to run again the same job, system is prompting me to create the steps again. I do not want to do that every time i want to run the job. how can I save this 4 steps under a job and just call the job name to schedule immediately on demand/when needed?

    Swathi,
    Create the job, leave the job with a status of  'scheduled' (no start conditions).
    When the user wishes to run the job:  SM37 > select your job; then Job > repeat scheduling. The user will have to determine the trigger; presumably it will be 'Immediate'; however, any of the normal selections are possible.
    This activity will start a copy of your scheduled job.  Your job remains with a status of scheduled.
    Since it is so easy for a user to make a mistake and inadvertently release your job, you might want to create a backup copy.  SM37 > select your job; then Job > copy.  This will give you a screen where you can create a copy of your job, but with a new name, such as <yourjobname>_BAK.
    Best Regards,
    DB49

  • Schedule Jobs with multiple steps via ABAP Program

    Hi,
    I need to schedule multiple programs via background jobs on a daily basis. Since all these jobs are to be run as a single job, the various programs have to be run as steps in a major job.
    I am however not very clear on how this can be done via an ABAP program ( the idea of a program is that various parameters to be passed to each program in the step can be entered dynamically rather than via variants).
    I am using the JOB_OPEN and JOB_CLOSE functions and submitting the programs with selection screen parameters dynamically passed to create a job. I need to do this for various programs as a job step (WITHOUT Variants being defined).
    Can anyone suggest any ideas for this? I have tried out JOB_SUBMIT Function but am not very confident I know what exactly it is for as it asks for a variant.
    Thanks very much,
    Preet

    Hi Preet,
    just to be sure: you know, that variants can be dynamical, too?
    It's quite usual to assign dynamical current date, but it's also possible to add / subtract value and even define own functionality.
    Maybe it's easier to implement a dynamical selection and handle static jobs.
    If you try to plan a job (online or with JOB_SUBMIT), you have to use variants - you can create (or change) them dynamical in beforehand. Only SE38, F8, F9 is creating a temporary variant, so that no saved variant is necessary.
    But if you end up creating variants dynamical, you can change one existing variant, too. Then you can use a static job definition (with periodical starting rule).
    So: have a look, if dynamic variants are enough, otherwise change variants per job.
    Regards,
    Christian

  • Scheduling a job with multiple output formats.

    Urgent!!
    Basically while scheduling a job in BI Publisher we specify an output format. It can be PDF, CSV, HTML or so… Is there a way to specify more than one output format while scheduling a job.
    Thanks in advance.
    Ashok

    you have to re-publish them.
    for a run, you can have only one output .

  • With multiple events in a single event case, how to associate value with the correct object?

    I am playing with the template where an event structure takes note of user inputs and a main state machine is then used to respond to these inputs. When I only monitor one control I use the 'NewVal' output to read out the changed value. But when I monitor multiple objects with a single case I also have to associate the readout with the correct owner. After some tinkering I was able to extract the label property and use a case to assign them. Are there better ways of doing this? For example maybe there is a way to connect the label text directly to the 'bundle by name'?
    Also this should be easy to accomplish by simply creating local variables of the objects and read from them, but I got the impression that the use of global and local variables is now strongly discouraged?
    Thanks for any suggestions!
    Attachments:
    Untitled.png ‏39 KB

    Well, I don't really like these theroretical discussions. Can you attach a simplified version of some of your code?
    There are many other ways to identify the particular control. You could for example search an array of references for the value of the "ctlref" event data node. This would make the code much more robust (your code will fail for example if you (or some other programmer updating your code in a few years!) notices a mispelling and edits the label without also changing the case structure cases).
    LabVIEW Champion . Do more with less code and in less time .

  • Identify origin of job with multiple instances running

    Hello,
    I have this scenario.
    There is a job (JOBA) that has 2 steps. 
    The first step executes Home ZProg 'A' which will use data that is unique to this run. It will create some TVARV information related to this run. (job name and number)
    The second step executes SAP Prog B (RFEBKA00), which will submit a different Job (RFEBKA00-EL BANK STATEM), which, at a point, executes SAP Prog C (RFEBBU00).  This program will call User Exit ZXF01U01, which will read the TVARV table and use the information written by ZProgr 'A' .
    This would not be complicated at all, except for one issue:
    There could be more than one JOBA running concurrently, so the User exit somehow needs to identify if the current call of the User exit is coming from the correct JOBA.
    I hope that you can help me tosolve this problem.
    Thanks!

    I forgot to say that all these jobs run with just one Batch ID (00BATCH). 
    Having said that, I think that I got a solution.
    I think that by using a different Batch Id (00BATCH01) in JOBA and accessing table TBTCO from the user exit I can identify if the UE is being executed from the correct job, since the batch user id will be propagated when the new job is submitted.
    I think I can work with this option.
    If anybody knows of a different way.  Please go ahead and let me know.
    Thanks.

  • Showing unique dates with multiple events

    I have a series of calendar events that I'm pulling from a
    database, and each of them has an associated datestamp. Basically,
    I want to be able to compact the dates, so that each unique date is
    listed only once. I would like to present them in a format that
    looks something like this:
    Nov. 23: Pumpkin Festival
    Comic Book Convention
    Nov. 24: Woodworker's Presentation
    Gallery Showing
    Engineering Conference
    Nov. 26: Music Festival
    Right now, each event has to have a date associated with it.
    Like so:
    Nov. 23: Pumpkin Festival
    Nov. 23: Comic Book Convention.
    You can see, they're both on November 23rd.
    I've attached the code I'm using to pull the database. It's
    pulling events within a 31-day time period. Also, I've got
    variables that break up the datestamp into individual parts, so I
    just need to figure out how to show each unique date only
    once.

    > so that each unique date is listed only once
    One way is to use the "group" attribute of
    cfoutput.
    In your SELECT, add a calculated field that extracts the date only.
    Then ORDER BY that field and "group" by it in your cfoutput. Since
    it contains date/time values, you can use DateFormat() to display
    the dates in MMM dd format.
    select
    convert(datetime, convert(varchar, yourDateColumn, 112), 112)
    as SortDate,
    othercolumns ...
    from your_table
    order by SortDate, othercolumns

  • Button with multiple events/clicks

    I have a flash file, and I'm making just a simple "ad" with right and left buttons..
    When you click the right/left arrows I want it to scroll  and it basically  will alternate between 3 different photos/ad's and then
    loop.. I have set up motion tweens on my time lines so when you click it will switch pictures/ads... I cannot seem to get the action script right
    for this.. does anyone know what would be the right way to go about this thanks!

    don't cross-post - especially in the as1/as2 and as3 forums.  pick the appropriate forum and post there.

  • Foreign Currency Loan (with multiple re-payments schedule)

    Hello Experts.
    Please provide me with your inputs on product types to be used for foreign currency loan borrowed with multiple repayments schedule
    For Ex:
    I took foreign currency loan on 1st July 2013 - 10000$ @ 1% interest.
    Now I need to make payment of 2500$ after every six months.
    Like 2500$ on 1st January 2014
    Another 2500$ on 1st July 2014
    Third installment 2500$ on 1st January 2015
    Final part 2500$ on 1st July 2015.
    How do i map above scenario?. Is there some separate product type for such scenario. At present, I am using product type 55A which has one end term.
    Please provide with your inputs.
    Deepak

    Hi Deepak,
    this is quite straightforward - you can use e.g. Product type 55A (Product category - 550 - Interest rate instrument) and in a tab 'Structure' in a field group 'Repayment structure' choose '2 - Installment repayment'  and specify an installment amount (in your case 2500$) and also frequency of the installment repayment (like 6 months in your case).
    of course, you have to verify that relevant Condition types are correctly defined in Customizing.
    Kind regards,
    Renatas

  • Multiple events in firePartialAction

    I have two event handlers, A and B. How can I fire both events from one <firePartialAction>?

    johnsold wrote:
    You cannot change all the buttons at once, but you can still use the OR nature of the event structure with multiple events for one case.
    Create a case for the three buttons' Value Changed events. Inside the case read all three buttons. AND the result. Wire the AND to a case structure. In the True case activate the code you want for all the buttons.  In the False case do nothing.
    Lynn
    You will need to pay attention to the mechanal action of the buttons. If they clear when read this will not work.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • How to schedule a background Job based on events

    Hi,
    We are on 4.6 C.
    We have a background job that has two ABAP programs.
    We need to start the 2nd ABAP program only after the first one has run successfully.
    If the second ABAP program does not run, the the job should have a status "FINISHED".
    Help appreciated.
    Thanks
    Mala

    Hi,
    How to schedule a background Job based on events,please refer to the follow SAP help:
    You can use events that have already been defined, or you can create new events for scheduling background jobs.
    If you wish to use new events, do the following to implement the event scheduling:
    Define and transport the event as a user event with transaction SM62.
    You must define only event IDs; event arguments are not defined in the R/3 System. Instead, you specify event arguments when you schedule a job to wait for an event and when you trigger the event.
    If you define a new event, you must also transport it to your production systems. The event transaction does not have a connection to the transport system. Instead, you must create a transport request for the event yourself.
    Do this to transport an event:
    Create a transport request.
    Start the editor in the transport request and enter the following:
    R3TR TABU <table name> where table name is BTCSEV for a system event ID, BTCUEV for a user event ID.
    Press F2 with the cursor on the table name to call up the screen for specifying the table entries to transport. In this screen, enter the event ID’s that you have created.
    Save and release the transport request. Ensure that it is imported into your production system(s).
    To trigger an event, add:
    – the function module BP_EVENT_RAISE to your ABAP program, or
    – the program SAPEVT to your external script, batch file, or program.
    When your programs execute these keywords, an event will be triggered in the R/3 background processing system. The event-based scheduler is started immediately. It in turn starts all jobs that were waiting upon the event, subject to normal background processing restrictions, such as the requirement that the job has been released to start.
    Schedule the jobs that are to run when your events are triggered.
    You can schedule jobs for one-time start or to be started whenever an event is triggered.
    Regards,
    collysun

  • How to schedule a background job using the Event concept..?

    Hi Folks,
    I have a requirement that, I need a schedule a background job.
    Once after the previous job successful only, new job should get triggered. How to go ahead with this..?
    For Eg, I am scheduling a job called ZTEST periodically for 1 minute. If the job is not get completing with in 1 minute, I dont want to start my new job. Only after the success of my old job, I want my new job to run.
    Waiting for ur replies.
    Regards,
    Savi.

    Hi,
    You can use events that have already been defined, or you can create new events for scheduling background jobs.
    If you wish to use new events, do the following to implement the event scheduling:
    Define and transport the event as a user event with transaction SM62.
    You must define only event IDs; event arguments are not defined in the R/3 System. Instead, you specify event arguments when you schedule a job to wait for an event and when you trigger the event.
    If you define a new event, you must also transport it to your production systems. The event transaction does not have a connection to the transport system. Instead, you must create a transport request for the event yourself.
    Do this to transport an event:
    Create a transport request.
    Start the editor in the transport request and enter the following:
    R3TR TABU <table name> where table name is BTCSEV for a system event ID, BTCUEV for a user event ID.
    Press F2 with the cursor on the table name to call up the screen for specifying the table entries to transport. In this screen, enter the event ID’s that you have created.
    Save and release the transport request. Ensure that it is imported into your production system(s).
    To trigger an event, add:
    – the function module BP_EVENT_RAISE to your ABAP program, or
    – the program SAPEVT to your external script, batch file, or program.
    When your programs execute these keywords, an event will be triggered in the R/3 background processing system. The event-based scheduler is started immediately. It in turn starts all jobs that were waiting upon the event, subject to normal background processing restrictions, such as the requirement that the job has been released to start.
    Schedule the jobs that are to run when your events are triggered.
    You can schedule jobs for one-time start or to be started whenever an event is triggered.
    Regards,
    Raj.

Maybe you are looking for