I have a specific scheduler job in Oracle that needs to be run every second.
I tried to create this (using a procedure):
begin
sys.dbms_scheduler.create_job(job_name => 'WBC6_PUBLIC.TESTE',
job_type => 'STORED_PROCEDURE',
job_action => 'proc_insert_data',
start_date => to_date('19-02-2020 09:00:00', 'dd-mm-yyyy hh24:mi:ss'),
repeat_interval => 'Freq=Secondly;Interval=1',
end_date => to_date(null),
job_class => 'DEFAULT_JOB_CLASS',
enabled => true,
auto_drop => false,
comments => '');
end;
/
And this (using PLSQL_BLOCK):
begin
sys.dbms_scheduler.create_job(job_name => 'WBC6_PUBLIC.TESTE',
job_type => 'PLSQL_BLOCK',
job_action => 'insert into my_table (date) values (sysdate);',
start_date => to_date('19-02-2020 09:00:00', 'dd-mm-yyyy hh24:mi:ss'),
repeat_interval => 'Freq=Secondly;Interval=1',
end_date => to_date(null),
job_class => 'DEFAULT_JOB_CLASS',
enabled => true,
auto_drop => false,
comments => '');
end;
/
But the result is the same, the job runs every ~ 4 seconds.
Is there a parameter or something I can do to run every second?