TO CREATE A JOB:
Begin
Dbms_scheduler.Create_job (
Job_name => 'RUN_JOB_TO_RUN',
Job_type => 'PLSQL_BLOCK',
Job_action => 'BEGIN JOB_TO_RUN(); END;',
Start_date => To_timestamp_tz('10-NOV-2015 13:00:00','DD-MM-YYYY HH24:MI:SS'),
Repeat_interval => 'FREQ = DAILY; BYHOUR=13',
comments => 'Some job to run.',
Enabled => True);
End;
TO UPDATE A JOB:
begin
Dbms_scheduler.Set_attribute
( name => 'RUN_JOB_TO_RUN'
, Attribute =>'REPEAT_INTERVAL'
, value =>'FREQ=DAILY; BYHOUR=2');
End;
No comments:
Post a Comment