at-单次性任务

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
  • 任务编号
  • 任务执行时间
  • 任务所在队列
  • 作业所有者
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值