The atq
command is a Linux command that is used to list the current user’s AT tasks. AT is a command-line utility that enables users to schedule tasks to run at a specific time.
Overview
The atq
command displays a list of all the current user’s AT tasks that are scheduled to run. The output of the command includes the job number, the date and time the job was submitted, and the date and time the job is scheduled to run. The job number is a unique identifier that is assigned to each job when it is submitted.
To use the atq
command, simply open a terminal window and type atq
followed by the Enter key. The output of the command will be displayed in the terminal window.
Examples
To list all of the current user’s AT tasks, type the following command and press Enter:
atq
This will display a list of all the current user’s AT tasks.
Options
The atq
command has the following options:
Option | Description |
---|---|
-q | Specifies the name of the AT job queue to display. |
-v | Displays more detailed information about each job. |
Examples
To display the jobs in the batch
queue, type the following command and press Enter:
atq -q batch
To display more detailed information about each job, type the following command and press Enter:
atq -v
Troubleshooting Tips
If the atq
command does not display any jobs, it is likely that there are no jobs scheduled to run at that time. To verify that the AT service is running, type the following command and press Enter:
systemctl status atd.service
This will display the status of the AT service. If the service is not running, type the following command and press Enter to start the service:
sudo systemctl start atd.service
Notes
- The
atq
command only displays jobs that were submitted by the current user. - The
atq
command can be used in conjunction with theatrm
command to remove jobs from the AT queue.