Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2008
    Posts
    38

    Unanswered: job with dbms_scheduler

    Hi.
    I have a question.
    Last edited by tjay83; 05-12-08 at 15:05.

  2. #2
    Join Date
    Feb 2008
    Posts
    38
    I can manage to run the job everyday except sunday and every two hours within these days, but I also want ıt to be run only once on Sunday.How can I add it to code ??

    Here is my code:


    BEGIN
    sys.dbms_scheduler.create_job(
    job_name => '"SYS"."TK"',
    job_type => 'PLSQL_BLOCK',
    job_action => 'begin
    DECLARE XX NUMBER;BEGIN SELECT 1 INTO XX FROM DUAL;END;
    end;',
    repeat_interval => 'FREQ=HOURLY;INTERVAL=2;BYDAY=MON,TUE,WED,THU,FRI, SAT;',
    start_date => systimestamp,
    job_class => 'DEFAULT_JOB_CLASS',
    auto_drop => FALSE,
    enabled => TRUE);
    END;
    /

  3. #3
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >How can I add it to code ??
    Make a separate entry which only runs it once on Sunday.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  4. #4
    Join Date
    Feb 2008
    Posts
    38
    I want to repeat the job every 1hour 22 minutes on Monday to Saturday
    and
    only once On sundays.
    In order to perform this task I thınk I need to create two schedules.However
    I cannot create the second schedule


    BEGIN sys.dbms_scheduler.create_schedule('my_schedule',
    repeat_interval => 'FREQ=WEEKLY;BYHOUR=11;BYDAY=SUN');
    END;
    /

    PL-SQL completed successfully.


    BEGIN sys.dbms_scheduler.create_schedule('my_main',
    repeat_interval => 'FREQ=HOURLY;INTERVAL=2;BYDAY=MON,TUE,WED,THU,FRI, SAT;INCLUDE=my_schedule');
    END;
    /


    ORA-27421: usage of INTERVAL > 1 & INCLUDE & FREQ < MONTHLY not supported in a
    calendar definition
    ORA-06512: at "SYS.DBMS_ISCHED", line 679
    ORA-06512: at "SYS.DBMS_SCHEDULER", line 1130
    ORA-06512: at line 1

Posting Permissions

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