DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: need help in creating job and window

  1. #1
    Join Date
    Nov 2006
    Posts
    11

    need help in creating job and window in ORACLE 10g

    hi all , plz help me tell me how to create job in follwing scheduling

    (i need to create job working only (( daily from 11:00 am to 3:00 pm except on friday and Saturday )) )



    if i should use window beside job plz tell me how to use job and window together


    thx
    Tarek
    Last edited by taroo2; 11-14-2006 at 05:17 AM.

  2. #2
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,684
    I would do something like this in 10g:

    Code:
    BEGIN
      DBMS_SCHEDULER.create_job (
        job_name        => 'my_test_job',
        job_type        => 'STORED_PROCEDURE',
        job_action      => 'my_package.my_procedure',
        start_date      => SYSTIMESTAMP,
        repeat_interval => 'freq=weekly; byday=sun,mon,tue,wed,thur; byhour=11,12,13,14,15; byminute=0; bysecond=0;',
        end_date        => NULL,
        enabled         => TRUE,
        comments        => 'My test job showing the required interval.');
    END;
    /
    Cheers

    Tim...
    Tim...
    OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
    OCA PL/SQL Developer
    Oracle ACE Director
    My website: oracle-base.com
    My blog: oracle-base.com/blog

  3. #3
    Join Date
    Nov 2006
    Posts
    11
    Hi . thx for ur reply

    i think that job will start at 11 and then stop and start at 12 and then stop ...... so on


    i want it to run every minute within this scheduling

  4. #4
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,684
    Hi.

    It would have helped if you had asked for that in the first place.

    In that case, just change the calendar string to minutely and remove the BYMINUTE reference:

    'freq=minutely; byday=sun,mon,tue,wed,thu; byhour=11,12,13,14,15; bysecond=0;'

    Cheers

    Tim...
    Tim...
    OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
    OCA PL/SQL Developer
    Oracle ACE Director
    My website: oracle-base.com
    My blog: oracle-base.com/blog

  5. #5
    Join Date
    Nov 2006
    Posts
    11
    Thx for ur support

Posting Permissions

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


Click Here to Expand Forum to Full Width