每天固定时间运行,比如早上8:10分钟:Trunc(Sysdate+1) + 8/24
每天:trunc(sysdate+1)
每周:trunc(sysdate+7)
每月:trunc(sysdate+30)
每个星期日:next_day(trunc(sysdate),’SUNDAY’)
每天6点:trunc(sysdate+1)+6/24
半个小时:sysdate+30/1440
----------------------------------
Job 新增
SQL> variable jobcheckmakesampling number;
SQL> begin
2 dbms_job.submit(:jobcheckmakesampling,'checkmakesampling;',sysdate,'sysdate+5/1440');
3 end;
4 /
Job 删除
查询 Job ID : select * from dba_jobs;
SQL> exec dbms_job.remove(65)
PL/SQL procedure successfully completed