2

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.

enter image description here

Vinod Chelladurai
  • 539
  • 6
  • 14
  • 27

2 Answers2

1

you can use DBMS_JOB.CHANGE() to Alter your job schedule.

Click on this link for complete reference from

Oracle Documentation:DBMS_JOB

and find DBMS_JOB.CHANGE()

Community
  • 1
  • 1
124
  • 2,757
  • 26
  • 37
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