cron是一个linux下的定时执行工具
/sbin/service crond start
启动服务
/sbin/service crond stop
关闭服务
/sbin/service crond restart
重启服务
/sbin/service crond reload
重新载入配置
也可以在/etc/rc.d/rc.loacl末尾加上
/sbin/service crond start 实现自动启动
crontab -u oracle -l 查询oracle的计划任务
vi /var/spool/cron/oracle 修改相关任务
0 2 * * 1 source /home/oracle/.bash_profile; /bin/sh /u01/app/back_1_2.sh
0 2 * * 2 source /home/oracle/.bash_profile; /bin/sh /u01/app/back_2_2.sh
0 2 * * 3 source /home/oracle/.bash_profile; /bin/sh /u01/app/back_3_2.sh
0 2 * * 4 source /home/oracle/.bash_profile; /bin/sh /u01/app/back_4_1.sh
0 2 * * 5 source /home/oracle/.bash_profile; /bin/sh /u01/app/back_5_2.sh
0 2 * * 6 source /home/oracle/.bash_profile; /bin/sh /u01/app/back_6_2.sh
0 2 * * 0 source /home/oracle/.bash_profile; /bin/sh /u01/app/back_7_0.sh
20 2 * * * du -sh /ora* /u01 >>/u01/app/RMAN_LOG_FILE.log | mail -s "Rman backup of neweasdb" abc@qq.com,efg@qq.com </u01/app/RMAN_LOG_FILE.log
0 4 * * * source /home/oracle/.bash_profile; /bin/sh /home/oracle/eascron_expdp_EAS_DAY.sh
[root@NEWEASDB app]# du -sh *
查看当前文件夹所有文件的大小