首页 > 代码库 > PL/SQL的JOB的创建

PL/SQL的JOB的创建

declare Insert_MobileAPP number;--Insert_MobileAPP为JOB的名字

begin

sys.dbms_job.submit(:Insert_MobileAPP,‘MobileAPPs;‘,sysdate,‘trunc(sysdate+1)+1/24‘);--MobileAPPs是存储过程的名字,
                                                                                                                             --sysdate为第一次执行时间
                                                                                                                         --‘trunc(sysdate+1)+1/24‘每天的执行时间                                                
commit;

end;

 

删除JOB

select * from all_jobs; 
看一下要删除的job号 
exec dbms_job.remove(jobno);

PL/SQL的JOB的创建