-
Could someone help me with the syntac below, Bascially, I want this package to be run at 4:00AM every Sat morning.
var j number
begin
dbms_job.submit
(
:j,
'SYS.DBMS_UTILITY.ANALYZE_SCHEMA(''LIS'',''COMPUTE'');',
'NEXT_DAY(trunc(sysdate),''SATURDAY'')+1/6'
);
COMMIT;
end;
/
when I look into INTERVAL and it said "NULL", how can I set the interval since I want this job to be run every Sat at 4:00AM???
Thanks
Last edited by mike2000; 10-22-2002 at 04:29 PM.
-
Hi
Issue:
-- start --
var j number
begin
dbms_job.submit(:j,'SYS.DBMS_UTILITY.ANALYZE_SCHEMA(''LIS'',''COMPUTE'');');
dbms_job.interval(:j,'NEXT_DAY(trunc(sysdate),''SATURDAY'')+1/6');
commit;
end;
/
-- end --
-
If you want to submit your job right now (immediately) and then every Saturday at 4:00AM, you would use:
Code:
var j number
begin
dbms_job.submit
(
:j,
'SYS.DBMS_UTILITY.ANALYZE_SCHEMA(''LIS'',''COMPUTE'');',
SYSDATE,
'NEXT_DAY(trunc(sysdate),''SATURDAY'')+1/6'
);
COMMIT;
end;
If you want to submit it next Saturday and then repeatedly every Saturday, you would use:
Code:
var j number
begin
dbms_job.submit
(
:j,
'SYS.DBMS_UTILITY.ANALYZE_SCHEMA(''LIS'',''COMPUTE'');',
NEXT_DAY(trunc(sysdate),''SATURDAY'')+1/6,
'NEXT_DAY(trunc(sysdate),''SATURDAY'')+1/6'
);
COMMIT;
end;
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|