==============oracle开机自启
vi /etc/crontab
#!/bin/bash
if [ -f /home/oracle/.bash_profile ]; then
. /home/oracle/.bash_profile
fi
lsnrctl start
sqlplus / as sysdba <<EOF
startup;
EOF
@reboot oracle ( sleep 60 ; sh /home/oracle/start_db.sh >> /home/oracle/start_db.log )
==============crontab任意秒数自动执行
#!/bin/bash
step=10 #间隔的秒数,不能大于60
for (( i = 0; i < 60; i=(i+step) )); do
python /home/oracle/zijinliu/zijinliu.py
sleep $step
done
exit 0