Home>Article>Operation and Maintenance> How to use atq command in linux

How to use atq command in linux

小老鼠
小老鼠 Original
2024-04-10 10:24:24 1123browse

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

atq [选项]

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:

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-voption:

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-Poption:

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!

Statement:
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