Information Technology Reference
In-Depth Information
Displaying the at Queue
The
atq(1)
command can be used to display the
at
jobs queued for the cur-
rent user. The jobs are displayed in chronological order of execution.
The
atq
command supports three command-line arguments:
The
-c
argument specifies that the jobs be listed in the order in which
they were created.
➤
The
-n
argument causes the
atq
command to list the total number of
jobs in the queue.
➤
The use of the last argument,
user
account, is described in the next
paragraph.
➤
If the
atq
command is executed by an authorized user (a user account with
the solaris.jobs.admin authorization), all jobs in the queue are listed. If a user
account is specified as a command-line argument, only the jobs associated
with the specified user are displayed.
Removing Jobs from the at Queue
The
atrm
(1) command can be used to remove one or more jobs from the
queue. The
atrm
command supports the following argument. The
-a
argu-
ment will cause
atrm
to remove all jobs for the user (or if executed by an
authorized user, all jobs on the queue). The
-f
argument forces the suppres-
sion of information about removed jobs. The
-i
provides an interactive
mode for selecting jobs to remove. If a job number is specified as a com-
mand-line argument, only that job is removed from the queue. If a
user
is
specified as a command-line argument, all the jobs for that user are removed
from the queue. The following listing shows the
atq
and
atrm
commands in
action.
$ atq
Rank Execution Date Owner Job Queue Job Name
1st Jul 27, 2002 18:30 ambro 1027809000.a a stdin
2nd Jul 27, 2002 19:00 ambro 1027810800.a a stdin
3rd Jul 27, 2002 20:00 ambro 1027814400.a a stdin
$ atq -c
Rank Execution Date Owner Job Queue Job Name
1st Jul 27, 2002 19:00 ambro 1027810800.a a stdin
2nd Jul 27, 2002 20:00 ambro 1027814400.a a stdin
3rd Jul 27, 2002 18:30 ambro 1027809000.a a stdin
$ atqrm 1027810800.a
1027810800.a: removed
$ atq
Rank Execution Date Owner Job Queue Job Name
1st Jul 27, 2002 18:30 ambro 1027809000.a a stdin
2nd Jul 27, 2002 20:00 ambro 1027814400.a a stdin