at
补充说明
语法
at [-V] [-q 队列] [-f 文件] [-mldbv] 时间 at -c 作业 [作业...]选项
-f:指定包含具体指令的任务文件;
-q:指定新任务的队列名称;
-l:显示待执行任务的列表;
-d:删除指定的待执行任务;
-m:任务执行完成后向用户发送E-mail。参数
实例
Last updated
at [-V] [-q 队列] [-f 文件] [-mldbv] 时间 at -c 作业 [作业...]-f:指定包含具体指令的任务文件;
-q:指定新任务的队列名称;
-l:显示待执行任务的列表;
-d:删除指定的待执行任务;
-m:任务执行完成后向用户发送E-mail。Last updated
[root@localhost ~]# at 5pm+3 days
at> /bin/ls
at> <EOT>
job 7 at 2013-01-08 17:00[root@localhost ~]# at 17:20 tomorrow
at> date >/root/2013.log
at> <EOT>
job 8 at 2013-01-06 17:20[root@localhost ~]# atq
8 2013-01-06 17:20 a root
7 2013-01-08 17:00 a root[root@localhost ~]# atq
8 2013-01-06 17:20 a root
7 2013-01-08 17:00 a root
[root@localhost ~]# atrm 7
[root@localhost ~]# atq
8 2013-01-06 17:20 a root[root@localhost ~]# at -c 8
#!/bin/sh
# atrun uid=0 gid=0
# mail root 0
umask 22此处省略n个字符
date >/root/2013.log