您的位置:首页 > 运维架构 > Linux

linux 下计划任务的设置

2014-04-30 18:01 357 查看
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 *

查看当前文件夹所有文件的大小
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: