How to use atq command in linux

小老鼠
Release: 2024-04-10 10:24:24
Original
1342 people have browsed it

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.

How to use atq command in linux

Usage of atq command

The atq command is used to view scheduled tasks in a Linux system.

Syntax

<code>atq [选项]</code>
Copy after login

Options

  • -c: Display the complete command line of the task , instead of just showing the task number.
  • -v: Displays detailed information about the task, including task owner, run time, and priority.
  • -P: Display tasks in order of priority.

How to use

To view all scheduled tasks, just enter the following command:

<code>atq</code>
Copy after login

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>
Copy after login

To see details about a specific task, use the -v option:

<code>atq -v 1</code>
Copy after login

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>
Copy after login

To display tasks sorted by priority, use the -P option:

<code>atq -P</code>
Copy after login

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>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template