Results 1 to 3 of 3

Thread: scheduled job

  1. #1
    Join Date
    Nov 2003
    Location
    kualalumpur
    Posts
    89

    Unanswered: scheduled job

    hello oracle developers..
    I want a procedure to be executed first day of every month automatically. The procedure takes previous month value and current year value(mm/yyyy format) as parameter.

    How to write the dbms_job.submit procedure..
    Please help me in doing this..
    thanks in advance..
    sridhar..

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    Try this:
    Code:
    declare
      l_job integer;
    begin
      dbms_job.submit
        ( job => l_job
        , what => 'my_proc(to_char(add_months(sysdate,-1),''MM/YYYY''));'
        , next_date => to_date('01-jul-2004','dd-mon-yyyy')
        , interval => 'add_months(trunc(sysdate,''MM''),1)'
        );
      commit;
    end;
    /

  3. #3
    Join Date
    Nov 2003
    Location
    kualalumpur
    Posts
    89

    thanks

    thank you very much..
    I'll test it and comeback to you .. if any issues..
    bye

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •