Home » SQL & PL/SQL » SQL & PL/SQL » Scheduling a job
Scheduling a job [message #7442] Fri, 13 June 2003 07:34 Go to next message
Joe
Messages: 138
Registered: November 1999
Senior Member
I am trying to schedule a job that executes at midnight, january 1, as soon as the new year starts. This job will reset several values. What I need to know is how to schedule to run ONLY at this time. I am using dbms_job. Thanks!
Re: Scheduling a job [message #7446 is a reply to message #7442] Fri, 13 June 2003 11:14 Go to previous message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
declare
  v_job  number;
begin
  dbms_job.submit(v_job, 'myproc;', trunc(add_months(sysdate, 12), 'y'), 'trunc(add_months(sysdate, 12), ''y'')');
  commit;
end;
/
Previous Topic: nested query
Next Topic: Cant understand the slowness
Goto Forum:
  


Current Time: Thu Mar 28 03:25:25 CDT 2024