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
<code>atq [选项]</code>
Options
How to use
To view all scheduled tasks, just enter the following command:
<code>atq</code>
This will display something like the following Output of:
<code>job 1 at 2023-03-14 10:00 job 2 at 2023-03-14 11:00</code>
To see details about a specific task, use the -v
option:
<code>atq -v 1</code>
This will display the following output:
<code>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</code>
To display tasks sorted by priority, use the -P
option:
<code>atq -P</code>
This will display the following output:
<code>job 2 at 2023-03-14 11:00 (priority 10) job 1 at 2023-03-14 10:00 (priority 0)</code>
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!