Oracle 定时任务

1. wiki

oracle定时任务

2. 新建

1
2
3
4
5
6
7
dbms_job.isubmit(
job=>100,
what=>'declare o_return_code number;o_return_msg varchar2(100);begin p_demo_c(sysdate,o_return_code,o_return_msg);end;',
next_date=>to_date('2020-10-22:09:37:44','YYYY-MM-DD:HH24:MI:SS'),
interval=>'sysdate + 5/24/60',
no_parse=>TRUE
);

3. 修改

1
2
3
4
-- exec dbms_job.next_date(job,next_date)
exec dbms_job.next_date(362,to_date('2020-10-23 11:35:25','YYYY-MM-DD:HH24:MI:SS'));
-- exec dbms_job.next_date(job,[TRUE|FALSE])
exec dbms_job.broken(342, FALSE);