This discussion is archived
1 Reply Latest reply: Sep 17, 2012 8:20 AM by spajdy RSS

Help with DBMS_JOB

drbiloukos Newbie
Currently Being Moderated
Hello people,

I studied the documentation and many websites about DBMS_JOB but I am still confused.

How do I schedule a procedure to run i.e. every sunday 10:00 AM ?

This is whta I tried:
      job        => X
     ,what       => 'TEST.STATS;'
     ,interval   => 'NEXT_DAY(TRUNC(SYSDATE), 'SUNDAY')+10/24'
     ,interval   => 'TRUNC(SYSDATE+1)'
     ,no_parse   => FALSE
:JobNumber := to_char(X);
Do I need to specify a next_date ?

Is the Interval related to next_date ?

Thank you in advance for your help.
  • 1. Re: Help with DBMS_JOB
    spajdy Pro
    Currently Being Moderated
    NEXT_DATE - define 1st job run
    INTERVAL - it is formula for ORACLE engine that use it to calculate NEXT_DATE for 2nd and followings run
    after job is finished ORACLE simply run SELECT <<INTERVAL>> FROM DUAL and get NEXT_DATE.
    So for INTERVAL is valid any formula that return a DATE.


  • Correct Answers - 10 points
  • Helpful Answers - 5 points