cd /usr/local/sbin/ //存放shell脚本 目录. vim guoguosql.sh //每30秒运行一个php文件. 文件路径为 vim /home/wwwroot/www/domain/huitiao/web/sql.php #! /bin/bash while :; do curl http://127.0.0.1:82/sql.php done sh /usr/local/sbin/guoguosql.sh & //运行 放入后台运行 vi
创建一个测试表和一个存储过程: create table a(a date); create or replace procedure test as begin insert into a values(sysdate); end; 定时任务样板: declare job1 number; begin dbms_job.submit(job1, what => 'test;', next_date => sysdate, interval => 'sysdate+1/(24*60*60