How to use the atq command in linux

小老鼠
Release: 2024-04-18 23:15:26
Original
1390 people have browsed it

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

atq Command 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:

<code class="bash">atq [选项] [用户列表]</code>
Copy after login

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:

<code class="bash">atq</code>
Copy after login

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 -u option followed by the username:

<code class="bash">atq -u username</code>
Copy after login

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

<code class="bash">atq -c job_number</code>
Copy after login

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

<code class="bash">atq -q job_number</code>
Copy after login

To view job details, use -V option:

<code class="bash">atq -V job_number</code>
Copy after login

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!

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