定时任务的应用场景举例
每天晚上 12点备份/etc/目录
tar
定时任务的三种分类
crond(crontab)定时任务软件(软件包cronie),用的最多的一种
atd,应用在只运行一次的任务
anacron ,非7*24小时运行的服务器(比如开机多长时间运行,关机多长时间运行)
[root@Dao ~]# rpm -qa cronie 查看安装的cronie软件版本 cronie-1.4.4-16.el6_8.2.x86_64 [root@Dao ~]# rpm -ql cronie 查看软件包详细列表 /etc/cron.d /etc/cron.d/0hourly /etc/cron.deny /etc/pam.d/crond /etc/rc.d/init.d/crond # crond定时软件 /etc/sysconfig/crond /usr/bin/crontab /usr/sbin/crond /usr/share/doc/cronie-1.4.4 /usr/share/doc/cronie-1.4.4/AUTHORS /usr/share/doc/cronie-1.4.4/COPYING /usr/share/doc/cronie-1.4.4/ChangeLog /usr/share/doc/cronie-1.4.4/INSTALL /usr/share/doc/cronie-1.4.4/README /usr/share/man/man1/crontab.1.gz /usr/share/man/man5/crontab.5.gz /usr/share/man/man8/cron.8.gz /usr/share/man/man8/crond.8.gz /var/spool/cron