标签:
declare jobno number;
begin sys.dbms_job.submit( jobno, ‘dayReport;‘,sysdate, ‘trunc(sysdate,‘‘mi‘‘)+1/(24*60)‘ );--dayReport为要执行的存储过程
commit;
end;
select * from sys.user_jobs /*查询job*/
/*启动job */
begin dbms_job.run(63); ;--63为创建的JOB编号
commit;
end
/*停止job*/
begin dbms_job.broken(63,true);
commit;
end;
/*每天早上8:30执行*/
begin dbms_job.interval(63,‘TRUNC(SYSDATE+1)+(8*60+30)/(24*60)‘);
commit;
end;
/*删除job */
begindbms_job.remove(63);
commit;
end;
标签:
原文地址:http://www.cnblogs.com/leixin-nation/p/4353972.html