I have a DBMS_jobs which is scheduled to run a procedure FINDING_PROCEDURE at 6 am evey day. Can anyone tell me how can i change the start time so that it is scheduled to run at 9 am from tomorrow. Thanks in advance.
Asked
Active
Viewed 1.6k times
2
-
This job doesn't run at 6am every day - it runs every 21 hours. – Frank Schmitt Feb 21 '14 at 12:11
2 Answers
1
As I already mentioned in my comment - your job doesn't run at 6 am every day, it runs every 21 hours.
As a second remark, you should seriously consider switching to DBMS_SCHEDULER - it's so much nicer than DBMS_JOB.
Anyway, to let this job run at 9am every day, this should do the trick:
DBMS_JOB.CHANGE (
job => your_job_id,
interval => 'trunc(sysdate) + 1 + 9/24');

Frank Schmitt
- 30,195
- 12
- 73
- 107
-
Hi Schmitt..thanks a lot. now the intervakl got changed to 'trunc(sysdate) + 1 + 9/24' but te value in NEXT SEC still remains 6 am. – Vinod Chelladurai Feb 21 '14 at 12:26
-
The new value for INTERVAL will be used when Oracle re-schedules the job (after the next execution). If it's not acceptable that the job will run tomorrow at 6am and every subsequent day at 9am, you'll have to additionally change the next_date attribute and set it to tomorrow 9am. – Frank Schmitt Feb 21 '14 at 12:56