How can I delay a dbms_job? [message #205022] |
Thu, 23 November 2006 01:37 |
ndahafa
Messages: 16 Registered: November 2006
|
Junior Member |
|
|
Hi,
I have a procedure that I want to run from today at 12 p.m and at 3 a.m every day thereafter.
I need to know how to delay the job so that it doesn't run immediately after submitting it. i.e. what should I use instead of sysdate to delay it till 12 p.m today?
here's my code:
declare
jobno number;
begin
dbms_job.submit( job => jobno,
what => 'begin procedure_name_here;end;',
next_date => sysdate,
interval => 'trunc(sysdate + 1) + 3/24');
commit;
dbms_output.put_line( ' your job is # '|| jobno);
end;
thanks in advance
|
|
|
|
|
|
|
Re: How do I find out why a job failed? [message #205079 is a reply to message #205055] |
Thu, 23 November 2006 04:35 |
ndahafa
Messages: 16 Registered: November 2006
|
Junior Member |
|
|
next_date => trunc(sysdate)+12/24
this worked, thanks.
however, my job failed. shows 4 failures since 12 p.m. how do I find out why a job failed? I know my procedure is running fine because when I call it without using dbms_job it runs successfully.
Is there an error log or something like that for scheduled jobs?
|
|
|
|