All about Database Jobs and Intervals

Introduction
The DBMS_JOB package allows a user to schedule a job to run at a specified time.  A job is submitted to a job queue and runs at the specified time.  The user can also input a parameter that specifies how often the job should run.  A job can consist of any PL/SQL code.
 

SNP Background Processes
SNP processes run in the background and implement database snapshots and job queues.  If an SNP process fails, Oracle restarts it without affecting the rest of the database.  An SNP process can run one job at a time with a maximum of ten SNP processes running simultaneously.  The INIT.ORA initialization file contains three parameters that control the behavior of the SNP processes:
 

Parameters

Description

JOB_QUEUE_PROCESSES

How many processes to start.  If set to zero, no jobs are executed. Default is 0.  Range is 0..1000.

JOB_QUEUE_INTERVAL (obsolete in 9i)

How long an interval the process will sleep before checking for a new job. Default is 60 sec.  Range is 1..3600 sec

JOB_QUEUE_KEEP_CONNECTIONS

Controls whether an SNP process closes any remote database connections. Default is False.  Range is True/False.

Quick overview of Oracle_Jobs

Create a Job (run it every day)
VARIABLE v_jobnum NUMBER;
BEGIN
    dbms_job.submit(:v_jobnum, 'MY_STORED_PROCEDURE;', sysdate,'sysdate+1');
END;
/

Run an Existing Job
exec dbms_job.run(job_number);

Remove a Job from the Job Queue
exec dbms_job.remove(job_number);

Review Job Status
Column Job# format a4
Column What format a27
Column Last_Date format a15
Column Next_Date format a15
select substr(to_char(job),1,3) Job#,
       substr(what,1,27) What,
       to_char(last_date, 'dd-MON-YY HH24:MI') Last_Date,
       to_char(Next_Date, 'dd-MON-YY HH24:MI') Next_Date, failures fail#,
       total_time
from user_jobs;
 
 

Examples
Monday through Friday Example
The following example shows how to schedule a job to be executed Monday through Friday:
DBMS_JOB.SUBMIT (:v_jobnum,'my_procedure;', sysdate,
                 'TRUNC(LEAST(NEXT_DAY(SYSDATE,''MONDAY''),
                              NEXT_DAY(SYSDATE,''TUESDAY''),
                              NEXT_DAY(SYSDATE,''WEDNESDAY''),
                              NEXT_DAY(SYSDATE,''THURSDAY''),
                              NEXT_DAY(SYSDATE,''FRIDAY'') ))');

The following example shows how to schedule a job to be executes Monday through Friday at 6:00 pm:
DBMS_JOB.SUBMIT (:v_jobnum,'my_procedure;', sysdate,
                 'TRUNC(LEAST(NEXT_DAY(SYSDATE,''MONDAY''),
                              NEXT_DAY(SYSDATE,''TUESDAY''),
                              NEXT_DAY(SYSDATE,''WEDNESDAY''),
                              NEXT_DAY(SYSDATE,''THURSDAY''),
                              NEXT_DAY(SYSDATE,''FRIDAY'') )) + 18/24');

Notes:
** Two single quotes are used around the day of the week, not double quotes.
** Ensure that the 4th parameter is all on one line.  Allow the line to wrap if necessary.  The 4th parameter only allows 200 characters. Several white spaces can cause this limit to be reached quickly.

Midnight Example
The following example shows how to schedule a job to execute at midnight every night:
DBMS_JOB.SUBMIT (:v_jobnum, 'my_procedure;', trunc(sysdate) + 1,'sysdate + 1');

The 'trunc(sysdate) + 1' sets the time back to the current day, midnight, and informs the scheduler to start the job at the following midnight.
The 'sysdate + 1' sets the interval to 1 day.  This job would run the first time at midnight, then every midnight afterwards.
To schedule the job at 8 a.m., specify the next_date parameter as trunc(sysdate) + 1 + 8/24.

Daily Example
The following example shows how to schedule a job to execute every day at the same time:
DBMS_JOB.SUBMIT (:v_jobnum, 'my_procedure;', trunc(sysdate)+?.??/24,'trunc(sysdate+1)+?.??/24');

To run the job at the same time every day, make sure that you pass the same value '?.??/24' to both the 'next_date' and 'interval' parameters. The value returned by trunc(sysdate) is midnight today and the value returned by trunc(sysdate + 1) is midnight tomorrow.

Hourly Example
If the interval between execution should be 1 hour, then the job must be submitted as
 EXEC DBMS_JOB.SUBMIT(:jobno,'MY_PROCEDURE;', SYSDATE, 'SYSDATE + 1/24');

To specify the time, say every half past hour the procedure has to execute,
dbms_job.submit(:jobno,'my_procedure;',to_date('28/nov/00 15:30:00', 'dd/mon/yy HHH4:MI:SS'),'sysdate+1/24');
 

Start at Specific Time and run it every Sunday at 9 AM
DBMS_JOB.SUBMIT (:v_jobnum, 'MY_PROCEDURE;', TO_DATE('0409200009','DDMMYYYYHH24'), 'NEXT_DAY(TRUNC(SYSDATE),''SUNDAY'')'); 
or
DBMS_JOB.SUBMIT (:v_jobnum, 'MY_PROCEDURE;', to_date('15-Aug-2002 12:00','dd-Mon-yyyy hh24:mi'),   'NEXT_DAY(TRUNC(SYSDATE),''SUNDAY'')'); 

Example of Monthly execution
dbms_job.submit(:v_jobnum, 'PROCEDURE;', to_date('15-Aug-2002 12:00','dd-Mon-yyyy hh24:mi'),  sysdate+to_char(last_day(sysdate),'dd')); 

Restore a Broken Job
exec dbms_job.broken(#, false);
commit;


CAUTION!! with INTERVAL
The interval part of the job is analyzed AFTER the job is executed. If you want the job to run at the top of the hour, and you specified an interval of 'sysdate+1/24'... recognize that the value for sysdate is going to be evaluated AFTER the job completes... so if the elapsed time of the job is 5 minutes, the job will be executed at times like 1:00, 2:05, 3:10, 4:15, 5:20, etc.
If you want the job to run on the hour, every hour, then you need to account for a possible delay in the start of the job, as well as the elapsed run time of the job in the value of sysdate.
Just make sure that expression used for the interval results in the value that you want e.g. to schedule a job to run at the top of each hour, specify interval as 'trunc(sysdate,''HH24'')+1/24'.
Examples:
Run every day at 8.00 in the morning:
        dbms_job.submit(:jno,'xyz;',trunc(sysdate)+1/3,'trunc(sysdate+1)+1/3') ;

Run every day, every hour at the top of the hour starting on the next top of the hour:
        dbms_job.submit(:jno,'xyz;', trunc(sysdate)+to_char(sysdate,'hh')/24+1/24 , 'trunc(sysdate,''hh'')+2/24' ) ;
or
        DBMS_JOB.SUBMIT (:v_jobnum, 'my_procedure;', trunc(sysdate),  'trunc(sysdate,''hh'')+1/24' )


Import/Export:
Jobs can be imported and exported.  If a job is defined in one database, it can be transferred to another database.  This does not change the job number, environment, or definition.

Job Owner:
The person who submits a job to the job queue is considered the job's owner. The job's owner is the only one who can alter the job, force the job to run,
or remove the job from the queue.  If you need to look up any information regarding a submitted job, DBA_JOBS and USER_JOBS contain a lot of
information such as the job number, user, status, etc.

Job Definitions:
The WHAT parameter of the SUBMIT procedure specifies the job definition. The WHAT parameter should be a string that calls the stored procedure to
be run.  There can be any number of parameters.  All parameters should be IN parameters.  The only exceptions to this rule are the special identifiers next_date and broken.  Job definitions should be enclosed in single quotes and terminated with a semicolon.

DBMS_JOB.SUBMIT(1234,
                'employee_stats(''PROGRAMMER'',''FULL_TIME'',''HIRE_DATE'');',
                SYSDATE,
                SYSDATE + 7); 
 

Jobs Actually Running:
A simple join to the dba_jobs_running view will give us a good handle on the scheduled jobs that are actually running at this time. The new column of interest returned here is the sid which is the identifier of the process that is currently executing the job.

running_jobs.sql
set linesize 250
col sid            for 9999     head 'Session|ID'
col log_user       for a10
col job            for 9999999  head 'Job'
col broken         for a1       head 'B'
col failures       for 99       head "fail"
col last_date      for a18      head 'Last|Date'
col this_date      for a18      head 'This|Date'
col next_date      for a18      head 'Next|Date'
col interval       for 9999.000 head 'Run|Interval'
col what           for a60
select j.sid,
       j.log_user,
       j.job,
       j.broken,
       j.failures,
       j.last_date||':'||j.last_sec last_date,
       j.this_date||':'||j.this_sec this_date,
       j.next_date||':'||j.next_sec next_date,
       j.next_date - j.last_date interval,
       j.what
from (select djr.SID,
             dj.LOG_USER, dj.JOB, dj.BROKEN, dj.FAILURES,
             dj.LAST_DATE, dj.LAST_SEC, dj.THIS_DATE, dj.THIS_SEC,
             dj.NEXT_DATE, dj.NEXT_SEC, dj.INTERVAL, dj.WHAT
        from dba_jobs dj, dba_jobs_running djr
        where dj.job = djr.job ) j;


What Sessions are Running the Jobs
Now that we have determined which jobs are currently running, we need to find which Oracle session and operating system process is accessing them. This is done through first joining v$process to v$session by way of paddr and addr which is the address of the processs that owns the sessions, and then joining the results back to the jobs running through the sid value. The new columns returned in our query are spid which is the operating system process identifier and serial# which is the session serial number.

session_jobs.sql
set linesize 250
col sid            for 9999     head 'Session|ID'
col spid                        head 'O/S|Process|ID'
col serial#        for 9999999  head 'Session|Serial#'
col log_user       for a10
col job            for 9999999  head 'Job'
col broken         for a1       head 'B'
col failures       for 99       head "fail"
col last_date      for a18      head 'Last|Date'
col this_date      for a18      head 'This|Date'
col next_date      for a18      head 'Next|Date'
col interval       for 9999.000 head 'Run|Interval'
col what           for a60
select j.sid,
s.spid,
s.serial#,
       j.log_user,
       j.job,
       j.broken,
       j.failures,
       j.last_date||':'||j.last_sec last_date,
       j.this_date||':'||j.this_sec this_date,
       j.next_date||':'||j.next_sec next_date,
       j.next_date - j.last_date interval,
       j.what
from (select djr.SID,
             dj.LOG_USER, dj.JOB, dj.BROKEN, dj.FAILURES,
             dj.LAST_DATE, dj.LAST_SEC, dj.THIS_DATE, dj.THIS_SEC,
             dj.NEXT_DATE, dj.NEXT_SEC, dj.INTERVAL, dj.WHAT
        from dba_jobs dj, dba_jobs_running djr
       where dj.job = djr.job ) j,
     (select p.spid, s.sid, s.serial#
          from v$process p, v$session s
         where p.addr  = s.paddr ) s
 where j.sid = s.sid;



Changing Scheduled Jobs
The DBMS_JOB.CHANGE procedure alters a specified job that has already been submitted to the job queue. The job description, the time at which the job will be run, the interval between executions of the job, and the instance and force of a job can all be altered.

DBMS_JOB.CHANGE (
   job       IN  BINARY_INTEGER,
   what      IN  VARCHAR2,
   next_date IN  DATE,
   interval  IN  VARCHAR2,
   instance  IN  BINARY_INTEGER DEFAULT NULL,
   force     IN  BOOLEAN DEFAULT FALSE);

job - Number of the job being run.
what - PL/SQL procedure to run.
next_date - Date of the next refresh.
interval - Date function evaluated immediately before the job starts running.
instance - When a job is submitted, specifies which instance can run the job. This defaults to NULL, which indicates that instance affinity is not changed.
force - If this is FALSE, then the specified instance must be running. Otherwise, the routine raises an exception. If this is TRUE, then any positive integer is acceptable as the job instance.

Example:
EXECUTE DBMS_JOB.CHANGE(1, null, sysdate+3, null);

Changes the next_date of job number 1 from 08/11/2002 to (system date+3).
If system date is 15/12/2002, then the next_date will be 18/12/2002.

SELECT JOB, SUBSTR(WHAT,1,35), NEXT_DATE, NEXT_SEC, INTERVAL FROM DBA_JOBS;
JOB    SUBSTR(WHAT,1,35)    NEXT_DATE     NEXT_SEC    INTERVAL
-----------------------------------------------------------------------
1    HOUSEKEEP.DEL001;    18/12/2002     12:35:22    sysdate+(59/(24*60*60))   
3    HOUSEKEEP.DEL003;    10/04/2001     01:01:03    sysdate+(59/(24*60*60))   
4    DEPT.DELREC;         10/04/2001     01:01:03    sysdate+(59/(24*60*60))   
5    HOUSEKEEP.DEL004;    10/04/2001     01:01:03    sysdate+(59/(24*60*60))   


Change the WHAT
The definition of a job can be altered by calling the DBMS_JOB.WHAT procedure.

DBMS_JOB.CHANGE (
   job    IN  BINARY_INTEGER,
   what   IN  VARCHAR2);

Example:
The following example changes the definition for job 3. The procedure DEL003 is replaced by procedure DEL006.

execute DBMS_JOB.WHAT(3,'HOUSEKEEP.DEL006;');

SELECT JOB, SUBSTR(WHAT,1,35), NEXT_DATE, NEXT_SEC, INTERVAL FROM DBA_JOBS;
JOB    SUBSTR(WHAT,1,35)    NEXT_DATE     NEXT_SEC    INTERVAL
-----------------------------------------------------------------------
1    HOUSEKEEP.DEL001;    18/12/2002     12:35:22    sysdate+(59/(24*60*60))   
3    HOUSEKEEP.DEL006;    10/04/2001     01:01:03    sysdate+(59/(24*60*60))   
4    DEPT.DELREC;         10/04/2001     01:01:03    sysdate+(59/(24*60*60))   
5    HOUSEKEEP.DEL004;    10/04/2001     01:01:03    sysdate+(59/(24*60*60))   



Changing the Next Date
The DBMS_JOB.NEXT_DATE procedure alters the next execution time for a specified job.

DBMS_JOB.NEXT_DATE (JOB IN BINARY_INTEGER,
                    NEXT_DATE  IN DATE);
Example:
execute DBMS_JOB.NEXT_DATE(4,SYSDATE+3);

If the system date is 15/12/2002, then sysdate+3 is 18/12/2002.

SELECT JOB, SUBSTR(WHAT,1,35), NEXT_DATE, NEXT_SEC, INTERVAL FROM DBA_JOBS;
JOB    SUBSTR(WHAT,1,35)    NEXT_DATE     NEXT_SEC    INTERVAL
-----------------------------------------------------------------------
1    HOUSEKEEP.DEL001;    18/12/2002     12:35:22    sysdate+(59/(24*60*60))   
3    HOUSEKEEP.DEL006;    10/04/2001     01:01:03    sysdate+(59/(24*60*60))   
4    DEPT.DELREC;         18/12/2002     01:01:03    sysdate+(59/(24*60*60))   
5    HOUSEKEEP.DEL004;    10/04/2001     01:01:03    sysdate+(59/(24*60*60))   


Changing the Interval
The DBMS_JOB.INTERVAL procedure alters the interval between executions for a specified job.

DBMS_JOB.INTERVAL (job         IN  BINARY_INTEGER,
                   interval  IN  VARCHAR2);

If a job should be executed periodically at a set interval, use a date expression similar to 'SYSDATE + 7' in the INTERVAL parameter. Below are some common date expressions used for job execution intervals.

Exactly three days from the last execution
'SYSDATE + 3'

Every half hour
'SYSDATE + 1/48'

Every minute
'SYSDATE +(59/(24*60*60))'

Next Day -- Same time as last execution
'SYSDATE +(86400/(24*60*60))'

Every Friday at 3PM
'NEXT_DAY(TRUNC(SYSDATE),"FRIDAY") + 15/24'

Note: When specifying INTERVAL, remember that date literals and strings must be enclosed in single quotation marks. Also, the value of INTERVAL must be enclosed in single quotation marks.
The INTERVAL date function is evaluated immediately before a job is executed. When the job completes successfully, the date calculated from INTERVAL becomes the new NEXT_DATE. For example, if you set the execution interval to 'SYSDATE + 7' on Monday, but for some reason, (such as a network failure), the job is not executed until Thursday, 'SYSDATE + 7' then executes every Thursday, not Monday. If the INTERVAL date function evaluates to NULL and the job completes successfully, the job is deleted from the queue.
If you always want to automatically execute a job at a specific time, regardless of the last execution, (for example, every Monday), the INTERVAL and NEXT_DATE parameters should specify a date expression similar to 'NEXT_DAY(TRUNC(SYSDATE), "MONDAY")'.



Job Intervals and Date Arithmetic
Job execution intervals are determined by the date expression set by the interval parameter. One key to setting the interval correctly is determine which of the following applies to the job:

  1. Each execution of the job should follow the last by a specific time interval.
  2. The job should execute on specific dates and times.

Type 1 Jobs

Jobs of type 1 usually have relatively simple date arithmetic expressions of the type SYSDATE+N, where N represents the time interval expressed in days. The following table provides examples of these types of intervals.

Action Interval Time
Execute daily 'SYSDATE + 1'
Execute every 4 hours 'SYSDATE + 4/24'
Execute every 10 minutes 'SYSDATE + 10/1440'
Execute every 30 seconds 'SYSDATE + 30/86400'
Execute every 7 days 'SYSDATE + 7'
Do no re-execute and remove job NULL

NOTE: Remember that job intervals expressed as shown in the previous table do not guarantee that the next execution will happen at a specific day or time, only that the spacing between executions will be at least that specified. For instance, if a job is first executed at 12:00 p.m. with in interval of 'SYSTEM + 1', it will be scheduled to execute the next day at 12:00 p.m. However, if a user executes the job manually at 4:00 p.m. the next day using DBMS_JOB.RUN, then it will be rescheduled for execution at 4:00 p.m. the next day. Another possibility is that the database is down or the job queue so busy that the job cannot be executed exactly at the time scheduled. In this case, the job will run as soon as it can, but the execution time will have migrated away from the original submission time due to the later execution. This "drift" in next execution times is characteristic of jobs with simple interval expressions.

Type 2 Jobs

Jobs with type 2 execution requirements involve more complex interval date expressions, as see in the following table.

Action Interval Time
Every day at 12:00 midnight TRUNC(SYSDATE + 1)
Every day at 8:00 p.m. TRUNC(SYSDATE + 1) + 20/24
Every Tuesday at 12:00 noon NEXT_DAY(TRUNC(SYSDATE), "TUESDAY") + 12/24
First day of the month at midnight TRUNC(LAST_DAY(SYSDATE) + 1)
Last day of the quarter at 11:00 p.m. TRUNC(ADD_MONTH(SYSDATE + 2/24,3),'Q') - 1/24
Every Monday, Wednesday and Friday at 9:00 p.m. TRUNC(LEAST(NEXT_DAY(SYSDATE, "MONDAY"), NEXT_DAY(SYSDATE, "WEDNESDAY"), NEXT_DAY(SYSDATE, "FRIDAY"))) + 21/24

Job Intervals Examples
Remember that the dbms_job.submit() procedure accepts three parameters:

DBMS_JOB.SUBMIT (
job => :jobno
, what => 'statspack.snap;' -- What to run
, next_date => TRUNC(sysdate+1/24,'HH') -- Start next hour
, interval => 'TRUNC(SYSDATE+1/24,''HH'')' -- Run every hour
);
--  =========================================================
-- Schedule a SNAPSHOT to be run on this instance every hour
-- =========================================================

VARIABLE jobno NUMBER;
VARIABLE instno NUMBER;

BEGIN

select instance_number into :instno from v$instance;

-- ------------------------------------------------------------
-- Submit job to begin at 0600 and run every hour.
-- ------------------------------------------------------------
DBMS_JOB.SUBMIT (
:jobno
, 'statspack.snap;'
, TRUNC(sysdate+1)+6/24
, 'TRUNC(SYSDATE+1/24,''HH'')'
, TRUE
, :instno);

-- ------------------------------------------------------------
-- Submit job to begin at 0900 and run 12 hours later
-- ------------------------------------------------------------
DBMS_JOB.SUBMIT (
:jobno
, 'statspack.snap;'
, TRUNC(sysdate+1)+9/24
, 'TRUNC(SYSDATE+12/24,''HH'')'
, TRUE
, :instno);

-- ------------------------------------------------------------
-- Submit job to begin at 0600 and run every 10 minutes
-- ------------------------------------------------------------
DBMS_JOB.SUBMIT (
:jobno
, 'statspack.snap;'
, TRUNC(sysdate+1)+6/24
, 'TRUNC(sysdate+10/1440,''MI'')'
, TRUE
, :instno);

-- ----------------------------------------------------------------
-- Submit job to begin at 0600 and run every hour, Monday - Friday
-- ----------------------------------------------------------------
DBMS_JOB.SUBMIT (
:jobno
, 'statspack.snap;'
, TRUNC(sysdate+1)+6/24
, 'TRUNC(
LEAST(
NEXT_DAY(sysdate,''MONDAY'')
, NEXT_DAY(sysdate,''TUESDAY'')
, NEXT_DAY(sysdate,''WEDNESDAY'')
, NEXT_DAY(sysdate,''THURSDAY'')
, NEXT_DAY(sysdate,''FRIDAY'')
) + 1/24
, ''HH'')'
, TRUE
, :instno);

COMMIT;

END;
/
Oracle Date Math Examples
Date / Time Fraction Description
WHERE (date) > sysdate - 6/24; Past 6 hours. (or 1/4 of a day ago)
WHERE (date) > sysdate - 6; Past six days
WHERE (date) > sysdate - 6/1440; Past six minutes
6/24
1/4
6 hours
1/24/60/60
5/24/60/60
One second
Five seconds
1/24/60
5/24/60
One minute
Five minutes
1/24
5/24
One hour
Five hours
TRUNC(SYSDATE+1/24,'HH') Every one hour starting with the next hour
Run Statspack Snapshot Every 15 Minutes
variable jobno number;
variable instno number;
BEGIN
SELECT instance_number INTO :instno FROM v$instance;
DBMS_JOB.SUBMIT(:jobno, 'statspack.snap;', TRUNC(sysdate)+(TRUNC(to_char(sysdate,'sssss')/900)+1)*15/24/60, 'TRUNC(sysdate)+(TRUNC(to_char(sysdate,''sssss'')/900)+1)*15/24/60', TRUE, :instno);
COMMIT;
END;
/
Run Statspack Snapshot Every 1 Hour
variable jobno number;
variable instno number;
BEGIN
SELECT instance_number INTO :instno FROM v$instance;
DBMS_JOB.SUBMIT(:jobno, 'statspack.snap;', TRUNC(sysdate+1/24,'HH'), 'TRUNC(SYSDATE+1/24,''HH'')', TRUE, :instno);
COMMIT;
END;
/
Running a Job Every 30 Minutes Between 10.00 AM and 16.59 PM
VARIABLE v_jobnum NUMBER;
BEGIN
  DBMS_JOB.SUBMIT(:v_jobnum,'if to_char(sysdate,''HH24'') > 9 and to_char(sysdate,''HH24'') < 16 then
Your_Procedure;
end if;',
SYSDATE, 'sysdate + 30/1440');
END;
/


Here is an example code for producing an interval of every 15 minutes EXCEPT for Saturday.

CREATE OR REPLACE FUNCTION NextRunTime RETURN DATE as
    v_nextDate DATE;
    v_nowDate DATE;
    v_today VARCHAR2(10);
begin
    -- get the current date/time
    v_nowDate := SYSDATE;

    -- get the actual day (in character format) 15 minutes from now.
    v_today := TRIM(to_char( v_nowDate + (15/1440), 'DAY'));

    -- if the next interval ends up on Saturday, bump it up 1 day to Sunday (plus the normal 15 minutes)
    -- else go ahead and just go another 15 minutes.
    if (v_today = 'SATURDAY') then
        v_nextDate := v_nowDate + 1 + (15/1440); -- Bump it up a day to sunday + our normal 15 minutes.
    else
        v_nextDate := v_nowDate + (15/1440);
    end if;

return v_nextDate;
end;
/

To see this in context, you would submit it as such:
declare
    v_jobno NUMBER(5);
begin
    DBMS_JOB.SUBMIT(v_jobno, 'MyJobProc;', TRUNC(SYSDATE + 1), 'NextRunTime');
    commit;
    DBMS_OUTPUT.PUT_LINE('New Job No is: ' || v_jobno);
end;


The above would submit the job MyJobProc the next day at midnight (TRUNC truncates off any time portion), and uses the interval (next time) returned from NextRunTime.
select job, what, next_date, next_sec from user_jobs;
JOB   WHAT          NEXT_DATE     NEXT_SEC
----- -------------- -----------------  --------
58     MyJobProc;   03-JUN-05         00:00:00


Notice that the aboves NEXT_DATE, and SECOND of run is Midnight Jun 03. This is the start time listed in the 'next_date' parameter. When that job finishes, it will use 'NextRunTime' function to calculate out the following run.