Home > Database > Mysql Tutorial > oracle 创建job 语句

oracle 创建job 语句

WBOY
Release: 2016-06-07 14:55:11
Original
3085 people have browsed it

oracle 创建job 语句 Oracle declarejob number;beginsys.dbms_job.submit(job, 'PRODUCT;', --job要执行的工作(范例为要执行的存储过程) to_date('23-02-2012', 'dd-mm-yyyy'), 'TRUNC(SYSDATE+1)'); --执行job的周期(每天凌晨零点) dbms_output.put_lin

oracle 创建job 语句 Oracle
declare
job number;
begin
sys.dbms_job.submit(job,
                    'PRODUCT;', --job要执行的工作(范例为要执行的存储过程)
                      to_date('23-02-2012', 'dd-mm-yyyy'),
                      'TRUNC(SYSDATE+1)'); --执行job的周期(每天凌晨零点)
  dbms_output.put_line(job);
end;
/


job时间周期:

每天运行一次 'SYSDATE + 1'
每小时运行一次 'SYSDATE + 1/24'
每10分钟运行一次 'SYSDATE + 10/(60*24)'
每30秒运行一次 'SYSDATE + 30/(60*24*60)'
每隔一星期运行一次 'SYSDATE + 7'

Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template