Home>Article>Operation and Maintenance> How to use atq command in linux
In Linux systems, use the atq command to view scheduled tasks. The atq command has the following options: -c: Displays the complete command line of the task. -v: Display task details (owner, running time, priority). -P: Display tasks sorted by priority.
Usage of atq command
The atq command is used to view scheduled tasks in a Linux system.
Syntax
atq [选项]
Options
How to use
To view all scheduled tasks, just enter the following command:
atq
This will display something like the following Output of:
job 1 at 2023-03-14 10:00 job 2 at 2023-03-14 11:00
To see details about a specific task, use the-v
option:
atq -v 1
This will display the following output:
job 1 at 2023-03-14 10:00 queue = default owner = username jobname = unimportant priority = 0 flags = hold user time = 00:00:00 system time = 00:00:00 command = sleep 60 location = linux.example.com
To display tasks sorted by priority, use the-P
option:
atq -P
This will display the following output:
job 2 at 2023-03-14 11:00 (priority 10) job 1 at 2023-03-14 10:00 (priority 0)
The above is the detailed content of How to use atq command in linux. For more information, please follow other related articles on the PHP Chinese website!