atd和crond两个任务管理程序的区别
atd是一次性作业
crond是周期性作业
指定在2023/12/12 09:00将时间写入testmail.txt文件中
[root@rhce ~]# at 09:00 December 12 2023
warning: commands will be executed using /bin/sh
at> data >> /root/textmail.txt
at>
job 4 at Tue Dec 12 09:00:00 2023
[root@rhce ~]# atq
4Tue Dec 12 09:00:00 2023 a root
指定在每天凌晨4:00将该时间点之前的系统日志信息备份到个目录下(/var/log/messages ),备份后日志文件名显示格式logfileYY-MM-DD HH-MM
[root@rhce ~]# crontab -e
no crontab for root - using an empty one
crontab: installing new crontab
[root@rhce ~]# crontab -l
- 4 * * * copy -r /var/log /var/log/messages