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

How to use the atq command in linux

小老鼠
小老鼠 Original
2024-04-18 23:15:26 1142browse

atq can display the queue of jobs scheduled to run in Linux. The specific usage is as follows: View all scheduled jobs: atq View scheduled jobs for a specific user: atq -u Username View the command line of the job: atq -c Job number View the queue information of the job: atq -q Job number View the details of the job Message: atq -V job number

How to use the atq command in linux

Usage of atq command in Linux

atqCommand is used to display the queue of jobs scheduled to run at a given time. You can use this command to check information such as scheduled jobs on your system, their status, and scheduled execution time.

Syntax:

atq [选项] [用户列表]

Options:

  • -c: Command to display jobs OK.
  • -q: Displays job queue information.
  • -V: Display detailed information, including job ID, status, time and command.

Using:

To view all scheduled jobs without options, just enter the following command:

atq

This A list is displayed with the following information:

  • Job number
  • Job status (for example, Queued or Running)
  • The job's Run time (for example, "2023-03-08 13:30")
  • Job command (for example, "echo hello")

To view scheduled jobs for a specific user, please Use the-uoption followed by the username:

atq -u username

To view the job's command line, use the-coption:

atq -c job_number

To view the job's command line Queue information, use-qoption:

atq -q job_number

To view job details, use-Voption:

atq -V job_number

The above is the detailed content of How to use the 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