博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
linux定时crontab备份数据库
阅读量:7112 次
发布时间:2019-06-28

本文共 708 字,大约阅读时间需要 2 分钟。

[root@enfo124 ~]# service crond status
crond (pid  1758) is running...

停止:
[root@enfo124 ~]# service crond stop
Stopping crond:                                            [  OK  ]
[root@enfo124 ~]# su - cognos

查看状态:

[cognos@enfo124 ~]$ service crond status
crond is stopped
[cognos@enfo124 ~]$ su - root

开启:
[root@enfo124 ~]# service crond start
Starting crond:                                            [  OK  ]

查看状态:
[root@enfo124 ~]# service crond status
crond (pid  2805) is running...
[root@enfo124 ~]# su - cognos
[cognos@enfo124 ~]$ service crond status
crond (pid  2805) is running...

添加定时任务:

crontab -e

1
2
3
4
每天的14点15分进行访问此链接,进行备份
// 15     14       *      *     *     curl 
每隔15分钟进行访问此链接,进行备份
// */15     *       *      *     *     curl http://baidu.com

查看所有的定时任务:

crontab -l

本文转自 IT阿飞 51CTO博客,原文链接:http://blog.51cto.com/itafei/1975039

转载地址:http://lemhl.baihongyu.com/

你可能感兴趣的文章
C++继承
查看>>
2015.7个人反思小结以及兴许规划
查看>>
云端数据遭觊觎 安全问题不容忽视
查看>>
编译gaia
查看>>
如何识别真Microsoft服务与非Microsoft服务来定位病毒自己的服务
查看>>
大数据之路- Hadoop环境搭建(Linux)
查看>>
解决问题:保存图片到本地文件夹后,在图库里看不到保存的图片问题。
查看>>
Android 源码分析(八) Launcher 桌面启动App过程
查看>>
BFS--POJ 1979
查看>>
day 19
查看>>
HMMPfam的安装使用手记(转载)
查看>>
使用 innotop 监控
查看>>
Android一 流
查看>>
掌阅之语----》记录
查看>>
Linux下ld搜索问题:ld: cannot find -l"XX"
查看>>
C++ 常用的字符串处理函数实现
查看>>
e.key && e.which && e.keyCode
查看>>
.NET静态变量与静态方法并发的问题
查看>>
51nod 1073 约瑟夫环
查看>>
【C#公共帮助类】枚举独特类
查看>>