本文共 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/