Schedule definition incomplete

jlcox

Member³
Consider:

Code:
begin
  dbms_scheduler.create_schedule(schedule_name   => 'SCHD_2011_PLANT_HOLIDAYS',
                                 start_date      => to_timestamp_tz('01/01/2011 00:00:00 AMERICA/NEW_YORK',
                                                                    'dd/mm/yyyy hh24:mi:ss tzr'),
                                 end_date        => to_timestamp_tz('31/12/2011 23:59:59 AMERICA/NEW_YORK',
                                                                    'dd/mm/yyyy hh24:mi:ss tzr'),
                                 repeat_interval => 'freq=DAILY;bydate=20110422,20110530,20110704,20110705,20110905,
                                                     20111124,20111125,20111223,20111226,20111230',
                                 comments        => 'Plant Holidays 2011');
end;

Execute this in a command window, then query dba_scheduler_schedules and examine the REPEAT_INTERVAL column. Everything is good.

Now edit this schedule through the Scheduler window in PL/SQL Developer. Make a minor modification to the comments to enable the Apply button, then click it. Now query dba_scheduler_schedules again and look at the REPEAT_INTERVAL.

Uh-oh. A developer tool should not do damage like this.
 
Did this get fixed? I noticed that when I update/change a job in version 11.0.6.1796 (64 bit) 12.94440 it is using the following code:

begin
sys.dbms_scheduler.set_attribute_null(name => 'F1JOB_227009', attribute => 'repeat_interval');
sys.dbms_scheduler.set_attribute(name => 'F1JOB_227009', attribute => 'job_class', value => 'NEW_JOB_CLASS');
end;
/

Why would it be calling sys.dbms_scheduler.set_attribute_null? I did not change that value on the UI, just the Job Class.


UPDATE: It appears that the UI does not poplulate the "Interval" field and it sees it as null when it goes to call the dbms_scheudler packages.
 
Last edited:
This still appears to be an issue in the latest beta release. This would be a great interface if it was fully functional. Right now it is makes a mess.
 
Last edited:
More diagnostic information on this issue:

When I query dba_scheduler_jobs I have two entries listed below. You will notice that JOB_1 has a SCHEDULE_TYPE of PLSQL while JOB_2 has a SCHEDULE_TYPE of NAMED. I believe that the interface does not handle PLSQL schedule types correctly. Let me know if I can help in any other ways.

JOB_NAME JOB_1
JOB_STYLE REGULAR
PROGRAM_NAME RUN_JOB
SCHEDULE_NAME
SCHEDULE_TYPE PLSQL
REPEAT_INTERVAL sysdate + 60/86400

JOB_NAME JOB_2
JOB_STYLE REGULAR
PROGRAM_NAME RUN_JOB
SCHEDULE_NAME EVERY MINUTE
SCHEDULE_TYPE NAMED
REPEAT_INTERVAL
 
Last edited:
Back
Top