In case one needs to include time zone and daylight savings information in a job schedule, it must be supplied in the start_date parameter. The calendar arithmetic will then consider this information.
BEGIN
dbms_scheduler.create_job(
job_name => 'some_job',
job_type => 'PLSQL_BLOCK',
job_action => 'begin
null;
end;',
repeat_interval => 'freq=hourly;
bymonthday=1,2,3;
byhour=12,13,14;',
start_date => trunc(systimestamp) at time zone 'Europe/Berlin',
job_class => '"DEFAULT_JOB_CLASS"',
auto_drop => FALSE,
enabled => TRUE);
END;
/
select job_name, NEXT_RUN_DATE from dba_scheduler_jobs where JOB_NAME = 'SOME_JOB'; JOB_NAME NEXT_RUN_DATE ------------------------------ ---------------------------------- SOME_JOB 01.02.16 12:00:00,700000000 EUROPE /BERLIN
Make sure you have the latest DST patches in place.
Kommentar verfassen