atq Command

Purpose

Displays the queue of jobs waiting to be run.

Syntax

atq [ c | -n ] [ User ... ]

Description

The atq command displays the current user's queue of jobs that are waiting to be run at a later date, sorted in the order the jobs will be run. These jobs were created with the at command. If the user is root and User name is specified, the atq command displays only jobs belonging to that user.

Flags

Item Description
-c Sorts the queue by the time that the at command was issued.
-n Displays only the number of jobs currently in the queue.

Security

Attention RBAC users and Trusted AIX® users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.

Examples

In order to look at the queue created by the at command, enter:

atq

If there are jobs in the queue, a message similar to the following appears:

root.635623200.a         Wed     Feb 21  12:00:00 1990
root.635670000.a         Thu     Feb 22  01:00:00 1990

Files

Item Description
/usr/bin/atq Contains the atq program.
/var/spool/cron/atjobs Specifies the spool area.