Skip to content

Commit

Permalink
doc: update command/atq.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Dec 21, 2024
1 parent 0ae1a1b commit b1272c9
Showing 1 changed file with 32 additions and 6 deletions.
38 changes: 32 additions & 6 deletions command/atq.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,56 @@ atq

**atq命令** 显示系统中待执行的任务列表,也就是列出当前用户的at任务列表。

### 语法
### 语法

```shell
atq [-V] [-q 队列] [-v]
```

### 选项
### 选项

```shell
-V:显示版本号;
-q:查询指定队列的任务。
```

### 实例
### 示例

创建一个在10分钟后执行的任务,并列出当前用户的任务列表:

```shell
at now + 10 minutes
[root@localhost ~]# at now + 10 minutes
at> echo 1111
at> <eot>
at> <EOT>
job 3 at Fri Apr 26 12:56:00 2013
```

atq
使用`atq`命令查看当前用户的任务列表:

```shell
[root@localhost ~]# atq
3 Fri Apr 26 12:56:00 2013 a root
```

查询指定队列的任务:

```shell
[root@localhost ~]# at -q a now + 10 minutes
at> echo "Task in queue a"
at> <EOT>
job 4 at Fri Apr 26 13:06:00 2013
```

使用`atq`命令查看队列`a`中的任务:

```shell
[root@localhost ~]# atq -q a
4 Fri Apr 26 13:06:00 2013 a root
```

显示`atq`命令的版本号:

```shell
[root@localhost ~]# atq -V
atq (GNU at) 3.1.20
```

0 comments on commit b1272c9

Please sign in to comment.