at-(单次性任务)
at:指定一个时间执行一次任务
1.创建计划任务
# ctrl + d结束输入
# wall:Linux系统中进行广播
[root@liuyunfei-rhel-82 ~]# at now+2min
warning: commands will be executed using /bin/sh
at> wall hello
at> <EOT>
job 1 at Fri Jul 30 09:42:00 2021
2.查看未执行的计划任务
[root@liuyunfei-rhel-82 ~]# at -l
2 Sun Aug 1 14:00:00 2021 a root
[root@liuyunfei-rhel-82 ~]# atq
2 Sun Aug 1 14:00:00 2021 a root
3.删除计划任务
# job号
[root@liuyunfei-rhel-82 ~]# atrm 2
# 按照脚本来执行计划任务
[root@liuyunfei-rhel-82 ~]# at now+10min -f filename
[root@liuyunfei-rhel-82 ~]# at 6pm Monday
[root@liuyunfei-rhel-82 ~]# at now +5minutes
# 月,日,年
[root@liuyunfei-rhel-82 ~]# at 13:19 11/2/2021
4.解析任务的信息
2 Sun Aug 1 14:00:00 2021 a root
- 任务编号
- 任务执行时间
- 任务所在队列
- 作业所有者