oracle 定时任务创建

begin
  sys.dbms_job.submit(job => :job,
                      what => 'test;',
                      next_date => to_date('10-10-2016 09:19:18', 'dd-mm-yyyy hh24:mi:ss'),
                      interval => 'sysdate+1');
  commit;
end;
/


begin
  sys.dbms_job.submit(job => :job,
                      what => 'SP_MA_SYNC_CS;',
                      next_date => to_date('01-01-4000', 'dd-mm-yyyy'),
                      interval => 'TRUNC(SYSDATE + 1)');
  commit;
end;
/

to_date(to_char(sysdate,'yyyy-mm-dd')||' 01:00:00','yyyy-mm-dd hh24:mi:ss')

你可能感兴趣的:(数据库)