Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2004
    Location
    VA
    Posts
    35

    Unanswered: dbms_scheduler: Can a job have a start time different from its schedule?

    I have a WEEKDAY schedule defined as follows:

    begin
    dbms_scheduler.create_schedule (
    schedule_name => 'DAILY',
    repeat_interval => 'FREQ=DAILY; BYDAY=SUN,MON,TUE,WED,THU,FRI,SAT; BYHOUR=0;BYMINUTE=1;BYSECOND=0',
    comments => 'Daily'
    );
    end;
    /

    Is there a way to define a job that uses the WEEKDAY schedule, but has a different start time, say 17:00?

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    From a quick peruse of the docs, I'd say that BYHOUR=17 does that?

  3. #3
    Join Date
    Dec 2004
    Location
    VA
    Posts
    35
    Quote Originally Posted by andrewst
    From a quick peruse of the docs, I'd say that BYHOUR=17 does that?
    Sorry for the delay--I've been on vacation.

    If I use the "create_schedule" definition shown above, dbms_scheduler does *not* allow me to override the BYHOUR value of the schedule by defining a different value for BYHOUR in the job--it apparently allows only missing values to be specified in jobs. At least, I can't get it work.

  4. #4
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    You can create a schedule with the same name as an existing schedule, use
    DBMS_SCHEDULER.DROP_SCHEDULE to remove the schedule and put it back in.

    or use the DBMS_SCHEDULER.SET_ATTRIBUTE procedure to just change the specific value for the schedule.
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  5. #5
    Join Date
    Dec 2004
    Location
    VA
    Posts
    35
    Quote Originally Posted by beilstwh
    You can create a schedule with the same name as an existing schedule, use
    DBMS_SCHEDULER.DROP_SCHEDULE to remove the schedule and put it back in.

    or use the DBMS_SCHEDULER.SET_ATTRIBUTE procedure to just change the specific value for the schedule.
    What I was hoping to do is:

    • Create a schedule, called WEEKDAY, to be shared among multiple jobs
    • Create various jobs which run on the WEEKDAY schedule at 5:00 PM, 7:00 PM, 8:30 AM, etc.


    Is this possible?

Posting Permissions

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