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 *
查看当前文件夹所有文件的大小
/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 *
查看当前文件夹所有文件的大小
相关文章推荐
- CentOS设置服务开机启动的方法
- linux中rpm.bin文件与bin文件的区别
- linux 下创建查看添加删除用户组
- Linux常用命令
- linux ping指令学习
- 详解Linux安装GCC
- netlink简单介绍 (linux-3.14.2)
- 修改Linux下的文件以及文件夹的权限
- linux环境下调试一些嵌入式设备时出现Aborted、segmentation fault、卡死的问题
- 西邮Linux兴趣小组13级纳新免试题浅析(中)
- add chinese input for linux
- linux 下安装mysql
- Linux 程序中获取网关
- 《生活在Linux中》之:在Vim中使用Emacs
- Linux下OpenSSL 安装图文详解
- Linux环境变量的设置和查看方法
- MakeFile介绍
- linux中抓取数据库访问的数据包
- s3c2440linux2.6mmc/sd驱动程序
- Linux中expect命令实现交互,修改VNCPASSWD