Title: RE: dbms_job - running jobs every 15 minutes

I simplified it by using cron instead ... <g>

Raj
______________________________________________________
Rajendra Jamadagni              MIS, ESPN Inc.
Rajendra dot Jamadagni at ESPN dot com
Any opinion expressed here is personal and doesn't reflect that of ESPN Inc.
QOTD: Any clod can have facts, but having an opinion is an art!


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 21, 2003 7:24 PM
To: Multiple recipients of list ORACLE-L
Subject: dbms_job - running jobs every 15 minutes


Feeling particularly anal the other day,  I used the following
specification to
run statspack at the top of the hour, 15, 30 and 45 minutes after the
hour.

variable jobno number;
variable instno number;
begin
        select instance_number into :instno from v$instance;
        dbms_job.submit(
                :jobno
                , 'statspack.snap;'
                -- every 15 minutes at 00,15,30 and 45
                , trunc(sysdate,'hh24') +  ( ( 15 + ( 15 *
floor(to_number(to_char(sysdate,'mi')) / 15))) / ( 24 * 60 ))
                , 'trunc(sysdate,''hh24'') +  ( ( 15 + ( 15 *
floor(to_number(to_char(sysdate,''mi'')) / 15))) / ( 24 * 60 ))'
        );
        commit;
end;
/

Seems to me that the time specs could be simplified a bit.
Anyone care to give it a go?  :)
Jared

*********************************************************************This e-mail 
message is confidential, intended only for the named recipient(s) above and may 
contain information that is privileged, attorney work product or exempt from 
disclosure under applicable law. If you have received this message in error, or are 
not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000 
and delete this e-mail message from your computer, Thank 
you.*********************************************************************1


Reply via email to