欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 运维知识 > linux >内容正文

linux

Linux Crontab 安装使用详细说明

发布时间:2023/12/20 linux 32 豆豆
生活随笔 收集整理的这篇文章主要介绍了 Linux Crontab 安装使用详细说明 小编觉得挺不错的,现在分享给大家,帮大家做个参考.
yum -y install vixie-cron yum -y install crontabs

说明:
vixie-cron 软件包是 cron 的主程序;
crontabs 软件包是用来安装、卸装、或列举用来驱动 cron 守护进程的表格的程序。

 

二、配置

cron 是 linux 的内置服务,但它不自动起来,可以用以下的方法启动、关闭这个服务:

service crond start //启动服务 service crond stop //关闭服务 service crond restart //重启服务 service crond reload //重新载入配置 service crond status //查看crontab服务状态

 

在CentOS系统中加入开机自动启动: 

chkconfig --level 345 crond on

例子:

01 * * * * root run-parts /etc/cron.hourly 02 4 * * * root run-parts /etc/cron.daily 22 4 * * 0 root run-parts /etc/cron.weekly 42 4 1 * * root run-parts /etc/cron.monthly

 

转载于:https://www.cnblogs.com/leon-1125/p/8466229.html

总结

以上是生活随笔为你收集整理的Linux Crontab 安装使用详细说明的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。