Scheduling a job using dbms_job.submit
Hi,I would like to create a job, using dbms_job.submit, that runs :
From Monday to Friday
Every hour
From 3am to 6pm
Starting the next hour following the job creating
Could you please give me the code ?
The following code doesn't work :
DECLARE jobno number;
begin
dbms_job.submit(
jobno,
'statspack.snap(i_snap_level => 5);',
sysdate+1/24,
'trunc(least(next_day(SYSDATE,''LUNDI''),
next_day(SYSDATE,''MARDI''),
next_day(SYSDATE,''MERCREDI''),
next_day(SYSDATE,''JEUDI''),
next_day(SYSDATE,''VENDREDI''))+1/24,'HH')');
commit ;
end ;
Rgds,
Frederic
From Monday to Friday
Every hour
From 3am to 6pm
Starting the next hour following the job creating
Could you please give me the code ?
The following code doesn't work :
DECLARE jobno number;
begin
dbms_job.submit(
jobno,
'statspack.snap(i_snap_level => 5);',
sysdate+1/24,
'trunc(least(next_day(SYSDATE,''LUNDI''),
next_day(SYSDATE,''MARDI''),
next_day(SYSDATE,''MERCREDI''),
next_day(SYSDATE,''JEUDI''),
next_day(SYSDATE,''VENDREDI''))+1/24,'HH')');
commit ;
end ;
Rgds,
Frederic
0