Scheduler parameters

Hi
Can we generate the scheduler parameters from SQL query? We need to call a script that takes arguments provided by Scheduler but every time we run the job we need to generate different parameters. Can we do that?
Thanks

If your job is running in the database instance (ie it is not an external job) you can try to create a table containing the parameters and modify the job code to search for the right parameters in this table. See following example (for DBMS_JOB but should possible to adapt it for DBMS_SCHEDULER):
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:351033761220
There is another possibilty with DMBS_SCHEDULER.SET_JOB_ARGUMENT_VALUE that I've tested with Oracle XE (10.2.0.1).
SQL>
SQL> create table jp(
  2  jn varchar2(30),
  3  p varchar2(10));
Table created.
SQL> insert into jp values ('J1', '1');
1 row created.
SQL> insert into jp values ('J2', '2');
1 row created.
SQL> insert into jp values ('J3', '3');
1 row created.
SQL> insert into jp values ('J4', '4');
1 row created.
SQL> insert into jp values ('J5', '2');
1 row created.
SQL> insert into jp values ('J0', '0');
1 row created.
SQL>
SQL> create table jr(
  2  t varchar2(100));
Table created.
SQL>
SQL> create procedure proc (p1 varchar2)
  2  is
  3  l_p varchar2(10);
  4  begin
  5  select p into l_p from jp where jn = p1;
  6  insert into jr values(to_char(sysdate,'HH24:MI:SS') || ' ' || p1 || ' ' ||
l_p);
  7  commit;
  8  end;
  9  /
Procedure created.
SQL> show errors
No errors.
SQL>
SQL> --
SQL> -- enabled must be set to false otherwise ORA-27457
SQL> --
SQL>
SQL> begin
  2  dbms_scheduler.create_job (
  3   job_name            => 'jtest',
  4   job_type            => 'stored_procedure',
  5   job_action          => 'proc',
  6   number_of_arguments => 1,
  7   start_date          => systimestamp,
  8   repeat_interval     => 'freq=minutely;bysecond=0,10,20,30,40,50',
  9   end_date            => null,
10   enabled             => false);
11  end;
12  /
PL/SQL procedure successfully completed.
SQL> show errors
No errors.
SQL>
SQL> begin
  2  dbms_scheduler.set_job_argument_value (
  3   job_name => 'jtest',
  4   argument_position => 1,
  5   argument_value => 'J0');
  6  end;
  7  /
PL/SQL procedure successfully completed.
SQL> show errors
No errors.
SQL>
SQL> begin
  2  dbms_scheduler.enable('jtest');
  3  end;
  4  /
PL/SQL procedure successfully completed.
SQL>
SQL> begin
  2  dbms_lock.sleep(10);
  3  end;
  4  /
PL/SQL procedure successfully completed.
SQL>
SQL> begin
  2  dbms_scheduler.set_job_argument_value (
  3   job_name => 'jtest',
  4   argument_position => 1,
  5   argument_value => 'J1');
  6  end;
  7  /
PL/SQL procedure successfully completed.
SQL> show errors
No errors.
SQL>
SQL> begin
  2  dbms_lock.sleep(10);
  3  end;
  4  /
PL/SQL procedure successfully completed.
SQL>
SQL> select * from jr;
T
13:55:10 J0 0
13:55:20 J1 1
SQL>Edited by: P. Forstmann on 22 mai 2010 13:56

Similar Messages

  • Error in scheduling parameters for production orders

    Hi Guys,
    Greeting for the day u2026u2026u2026.
    I am trying to create production orders creation for own order  type ex MM01, but I am getting error message as u201C scheduling parameters are not defined for the order type u201C even though I have maintained following parameters as below,
    Production scheduler      -
    xxxxx,
    Detailed scheduling -
    check box of scheduling ticked,
    Rough cut scheduling    --- scheduling id u201301, scheduling and generate capa requi,, boxes     ticked,
    Adjust scheduling  -- requi to operation  date,
    Scheduling control for detailed scheduling ---backwards and check box of auto scheduling ticked
    Operation segment ---setup,
    All operation in order will be reduce
    Do not reduce,
    Could any one light on this issue,
    Thanks in advance,
    Mohan

    Hi,
      This error will come if you have not maintained Define scheduling parameters for production orders.
    Check this order type whether linked with respective plant in OPU3.*And give production scheduler * mark ie, all.*
    And in Define production scheduling profile - OPKP, link your order type in the page below.
    In material master work scheduling view, input production sch profile or prod scheduler.
    Regards,
    Dharma

  • Service Order-Scheduling Parameters not found

    Hi,
    I am working with a Service Order by creating an order with a  partoicular order type ,Plant & Business area.
    I am getting an error message that Scheduling parameters are not maintained.
    Can any body throw light with detailed steps of this functionality pl
    Nagarajan

    Hi,
    I could later solve by applying the required parameters on par with another order type which was working well.This relates to the Plant Maintennance order which is useed as an ext requiremnt for SRM
    Thanks,
    Nagarajan

  • Scheduling parameters are not defined for production orders

    Hi All,
             when i convert the planned order to production order  i got this massage popup coming  Scheduling parameters are not defined for production orders . please let me know this .

    Hi,
    One of major customization steps for the order type is missing. Run OPU3 and maintain settings for the order type you are using. You may copy settings from an older type.
    Regards.

  • Scheduling Parameters

    Hi,
    I am trying to customize the scheduling parameters in T.Code "OPU3". But the field "SelID: Detailed" under Detailed Schedule sub screen is coming as non editable. I want to give some selection id to this field. Please tell me that from which field the value can be populated here or is there any way to put the value directly here.
    Thanks !!

    Dear,
    It is not possible in standard SAP you can have this option for MRP run so it can possible to select in OPU5 not for OPUZ and OPU3. As in production order scheduling parameters are copied from OPL8.
    Hope clear to you.
    Could you please update me on your thread  MILL_OC to create combination order.
    There no classification required.
    Regards,
    R.Brahmankar

  • Scheduling parameters in networks

    Hi
    I have made a std. network thru CN01 and now when I try to include that std network into a new project , following problems come:  ( Iam actually trying to copy a project and a network from std templates)
    1. A pop up comes and says " You are trying to include a std network into hierarchy which has assigments to wbs elements, however the selected wbs does not corresponds to the assignments"  then two options come INCLUDE ASSIGNMENTS and IGNORE ASSIGNMENTS.
    On selecting either one of two , a error comes saying " No scheduling parametrs defined for the network " and then it doesnt let me save the project with the network.
    Something is missing in SPRO , but as I have checked I did not find anything missing. please suggest.
    Thanks,
    Dhruv

    Hi Dhruv kumar,
    If my understand is correct....you have created one STD network and you want to assign that std network to other operative project....am i right?...
    If above my understanding is correct......you might have missed the scheduling parameters configuration for plant and network type combination in the transaction OPU6...
    In this step you define control parameters for scheduling depending on the plant, the type of network and the production scheduler, for example:
    whether basic dates are to be adjusted if the network is shifted within the earliest/latest dates
    the scheduling type
    whether or how many days the start date can be in the past
    whether the dates are to be automatically recalculated on saving
    whether the error log is automatically displayed if errors were calculated in scheduling
    the number of days that the start date is in the past
    the reduction type that defines whether all the operations should be reduced or only those on the critical path
    maximum reduction level for reduction
    Please check once again whether you have done all the configuration required.
    Regards
    Vetri

  • FLOATS,BASIC DATES AND SCHEDULE PARAMETERS

    For MTS REP MANF with strategy 40-planning with final assembly and MRP type-PD In SPRO
    for scheduling and capacity parameters in (opu5) how to specify the floats for deteriming the BASIC DATES of planned order,and what are the parameter required to determine the BASIC DATES in spro
    and what are the scheduling parameters required to maintain planned order say ORDER TYPE -PE
    RUN SCHEDULE(PLANNED ORDER-PE) and ORDER TYPE-LA STOCK ORDER

    Dear,
    Foe Basic date scheduling you need to maintain the Inhouse production time in material master and IN MD102 run with scheduling parameter as 1- Basic date scheduling is only required scheduling.
    Regards,
    R.Brahmankar

  • Scheduling parameters in MRP

    Hi Gurus,
    what are the different effects on the PRs and Planned Orders for the different Scheduling Parameters in the MRP Run for 1 Basic Dates & 2 Leadtime & Capacity Planning?

    Hi,
    If you select Basic date scheduling, check in planned order or prod order, system will show only basic start date & finish date.
    If you select Lead time scheduling, check in planned order or prod order, system will show basic start date,finish date & Prod start date & finish date.
    With lead time scheduling, capacity requirement also system will generate.
    Regards,
    Dharma

  • MPS/MRP : OPM Schedule Parameters

    Hi Folks,
    "If you accepted the default organization from the previous field, the code for the
    default schedule parameters assigned to the user/planner (in User Profiles)
    displays here."
    Above Paragraph i copied from OPM - MPS/MRP user guide.
    My query is :
    Where i can find the "User Profiles"?
    Please reply me, this is urgent i have to continue my setup.....
    Razzy

    Hi Razzy ,
    May be from Session Parameters > Default Values > Schedule
    Regards,
    Ram

  • Adobe captivate scheduling parameters for recording via a program schedular

    Hi, I have 3 PC's running slide shows in 3 lecture rooms. I need to schedule the PCs to run Captivate 4, start and stop recordings and save the recorded file. Hopefully without me having to touch them untill the end of the day.
    I have a sheduling program that is capable of the load required and the ability to add the paramaters to do the functions I would like done eg. start and stop recordings and save the recorded file.
    I cant find anywhere the parameters required to do this or an example of someone else having done so.
    Any help would be extemely appreciated.

    Hi there
    Unfortunately, I've never heard of or seen such a thing.
    One possiblity would be to acquire a copy of a product called Macro Express and try that.
    Click here to view the Macro Express web site
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Change 'report parameters' of scheduled report

    How can I change the report parameters (not schedule parameters) programmatically and then schedule the 'modified' report immediately?
    Scheduling works off - Binding off InfoObjects model
    Modifying Parameters are based off - Binding off RAS model
    Should I be using the ReportDocument Object?
    Edited by: jam mend on Feb 2, 2009 6:31 PM

    IReport boReport = (IReport)boInfoObjects.get(0);
    IReportProcessingInfo reportInterface =
                   (IReportProcessingInfo) boReport.getPluginProcessingInterface("CrystalReport");
    reportInterface.getReportParameters()
    seems to have it.

  • Batch Scheduling of reports with parameters

    I've been searching the doc and have come up empty so far on this -- how do I take a Discoverer workbook/sheet that accepts a customer account parameter and set it up as a scheduled report?
    The trick here is that I want to schedule 100s of these things so that reports are generated for a large number of customer accounts, but not all customer accounts (there are many thousands of customer accounts).

    Hi,
    Yah! this looks good. Other way would be to use the Schedule command line parameter itself. For example you can have a form application taking the user parameter for individual user plus they can enter the schedule parameters also or you can hardcode them . Then you send this request to Report server which run the jobs at schedule time.
    FYI, in report 9i there is a new feature called event triggers also. You can run a report with any event trigger from the database. This may be useful for the solution you have suggested, suppose you wish to run the report as soon as user updates data in database, this even t triggers can be used.
    Hope this helps!
    Thanks,
    Rohit

  • Scheduling a Report from outside Scheduler but viewing the output in Plus

    We are using Discoverer 10.1.2
    I know that we can schedule a report within Discoverer Plus and the resulting out put can be seen in Discoverer under scheduled work books
    I am also aware that we put Discoverer command line commands in a DOS script and then schedule that script to run using an Enterprise scheduler and automatically export that report Excel.
    What I want is to schedule reports using our enterprise scheduler but view the resulting output in Discoverer under scheulded work books
    I was thinking that when we schedule a report Discoverer creates a package, something like EUL5_BATCH_PACKAGE080314170249.RUN;.
    Once that package is created, if I copy it and rename it and then schedule to run from our enterprise scheduler, would I be able to view the output from Discoverer ?
    ----- Added on 03/15/2008-------
    I did try running the above package EUL5_BATCH_PACKAGE080314170249.RUN from SQL Plus as I had indicated above. The settings on the report schedule were -
    - Run immediately
    - Never repeate
    - Delete the results after 9999 days ( maximum allowed )
    Now the first time the report ran automatically using DBMS_JOBS since I had set the report to run immediately.
    After that when I tried running EUL5_BATCH_PACKAGE080314170249.RUN from SQL Plus, the procedure completed but when I looked at the Discoverer front end, it indicated the run was in error with Unique constraint violation on EUL5_BQ_TABLES.EUL5_BQT_UK_1 index. However when I looked at the table it did not have any data in it.
    I the ran the procedure again from SQL Plus and this time it completed and when I looked at the Discoverer Plus front end, the results were ready for me to view.
    When I tried running the procedure again, it failed again with unique constraint violation and when the procedure was executed after that it again ran and i was able to view the results.
    So, ever alternate run from SQL Plus was successful. I would continue to try out different combinations of schedule parameters to see if I can get it to work.
    However, any one has already tried this before please let me know if what I am trying Is this possible ?
    Any help would be appreciated
    Thank you
    Message was edited by:
    manav_purohit
    Message was edited by:
    manav_purohit

    Thanks for the suggestion Rod. However, if I use DBMS_JOB.CHANGE, the report will still run using DBMS_JOB. What I would prefer is to not use DBMS_JOB.
    Running anything in DBMS_JOB means, the job is not visible in the enterprise scheduler that we use. Our enterprise scheduler is being monitored at a data center and if any jobs fail, appropriate on call individuals are contacted. Records are kept of failures and root cause is analyzed. So I want to take advantage of these procedures for scheduled reports as well.
    I am still looking for some alternative method.

  • Scheduling agreement for tentative and firm delivery schedules

    My client required 6 months tentative schedule and 14 days firm schedule for delivery. the same can be different for different customers. MRP type is PD, to meet this requirements, what configuration needed to be done ?

    Hi tapanpadhy 
    1. Please Check The Scheduling Parameters In Production order
    --SPRO-IMG-Production-Shop Floor control-Operation-Scheduling
    2. Also Check the Floats Before and After Production Order Confirmation OPU3
    3. Even In material Master u need to define the Lead time Scheduling
    4. always use backward scheduling in order to meet the Requirement dates
    If u follow above this u can meet the customer requirement date
    Let me know if your problem is solved
    Regards
    Pradeep

  • Not able to re-schedule the prod ord.........end date is not coming as desired

    Hi Experts,
    I want to change (reschedule the dates of production order) but when I am trying to do so system automatically picks its own dates and re-schedule the prod order....
    Please refer attachment
    In MD04, for component prod order (rescheduling date appears as 09/23/2013) with exception message 15 (reschedule out)

    Hello Mukesh,
    For the Material `AP1055E' Is your Production order based on any Demand Management (for example: customer requirement or Planned Independent requirement) or any such requirement quantity exists with system MD04. So as you said the system takes said default dates  09/23/2013 to fulfill the exists requirement with MD04.
    Check your default Scheduling parameters settings as well Re-scheduling horizon (days) and other parameters set with SAP T Code OMDW.
    Define Rescheduling Check
    The rescheduling period represents the period in which the system checks whether the existing dates of the receipt elements that are no longer allowed to be changed automatically still suit the requirements situation. If the dates of these elements are no longer suitable, the system creates the exception messages depending on the requirements situation:
    Please check and revert (if any)
    Also Reward if you think..
    Best regards,
    SG

Maybe you are looking for

  • LOVs in Discoverer

    I have a table that stores Cost Center and Description. I want to show an LOV like 100 New York 200 London 300 Tokyo and then for the user to select the value 100 and for all data to be queried from account balances for cost center 100. Problem is ho

  • Having problems restoring a first-gen iPod

    First time posting but I am out of ideas and even Google has limits so I'm giving this board a try. I have a first-gen iPod. I purchased it in October 2001 and it's in great physical condition. Only problem was that the battery would no longer hold a

  • Not getting total of results row in bex query

    Hi Experts, In Bex I have created new formula variable which is the Percentage of On time delivery for a particular vendor. The problem is when I use calendar year and vendor in rows and CK in columns and execute the query, I am not getting the the t

  • EDI for Railway BOL

    Has anyone here done EDI for Railway Bill of Lading? I would appreciate some help from someone who's done this before. Thank you.

  • How and When Does the attribute VI_ATTR_VXI_TRIG_STATUS get initialized

    How and When  Does the attribute VI_ATTR_VXI_TRIG_STATUS get initialized. Do the actual trigger lines get measured or does the attribute get initialized to a default value when the vxi resource manager is executed?