Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Define a job to run once an year

Re: Define a job to run once an year

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 24 Dec 2004 05:37:10 -0800
Message-ID: <1103895430.475146.316130@c13g2000cwb.googlegroups.com>

Robert Scheer wrote:
> Hi.
>
> I need to run a job once an year, more exactly on the last day of the
> year at 23:59. This job needs to drop a sequence and recreates it.
How
> can I configure the job to run at this exact moment in time?
>
> Thanks,
> Robert Scheer

set serverout on
declare
job_ integer;
begin
dbms_job.submit(job_,
'your_proc(''parameters'');',
trunc(to_date('12/31'||to_char(sysdate, 'YYYY'),

'MM/DD/YYYY')) + 1439/1440,
'trunc(to_date(''12/31'' || to_char(sysdate + 1,
''YYYY''), ''MM/DD/YYYY'')) + 1439/1440');
commit;
  dbms_output.put_line(to_char(job_));
end;
/

Regards
/Rauf Received on Fri Dec 24 2004 - 07:37:10 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US