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