日期:2014-05-16 浏览次数:20587 次
select job,what,next_date,next_sec,failures,broken from user_jobs;
begin dbms_job.remove(:JOB_NUM); end;
--每小时执行 DECLARE jobno number; BEGIN dbms_job.submit(jobno, 'RAW_PREACTHOUR(sysdate);', to_date('2010-07-05 16:58:00','yyyy-mm-dd hh24:mi:ss'), 'to_date(to_char(sysdate,''yyyymmddhh24mi''),''yyyymmddhh24mi'')+1/24'); END; --每日05:10:00执行 DECLARE jobno number; BEGIN dbms_job.submit(jobno, 'CUR_DAYREPORT_WIREWAYS(sysdate);', to_date('2010-07-07 05:10:00','yyyy-mm-dd hh24:mi:ss'), 'to_date(to_char(sysdate,''yyyymmddhh24mi''),''yyyymmddhh24mi'')+1'); END; --每月的第七天05:16:00执行 DECLARE jobno number; BEGIN dbms_job.submit(jobno, 'RAW_REPORTING_YEAR(sysdate);', to_date('2011-01-07 05:16:00','yyyy-mm-dd hh24:mi:ss'), 'TRUNC(LAST_DAY(SYSDATE ) + 7) + 316/1440'); END;