linux 下计划任务的设置

来源:互联网 发布:淘宝店主图尺寸 编辑:程序博客网 时间:2024/06/05 17:55

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 *
查看当前文件夹所有文件的大小


 


 

0 0
原创粉丝点击