Linux command-at: Perform a task at a specified time

Source: Internet
Author: User

Executes the task at the specified time.

Command format

At [-v] [-Q queue] [-f file] [-MLDBV] Time
At [-v] [-Q queue] [-f file] [-MLDBV]-T Time_arg
At-c job [Job ...]

Command parameters

-V
Print the version number on the standard error stream

-Q Queue
Use the specified queue. A queue is named with a single letter, and the valid naming range is a-Z and a-Z. The default queue for the AT command is the default queue for the A,batch command is B. The higher the order of letters, the lower the priority of the queue. The special queue "=" is reserved for the currently executing task.

-M
Sends a message to the user when the task completes, even if there is no output.

-F
Reads a task from the specified file instead of the standard output.

-L
Lists the at Task list for the current user. For the root user, the at list for all users is listed.

-D
Deletes a task based on the task number.

-V
Displays the time that the task will be executed.

-C
Connect the jobs listed in the command line and output to standard output.

-T Time_arg
Specifies the run time of the task Time_arg. The format of the Time_arg is [[CC]YY]MMDDHHMM.

Instance

A) perform the mission in 10 minutes

At now + 5 minutes Echo ' Hello World ' >> at.out <EOT>Job 3 at Tue 12 22:16:00 2015

b) Perform the Task 4 o'clock in the afternoon hours after 3 days

At 4pm + 3 days Echo ' Hello World ' >> at.out <EOT>Job 4 at Fri 15 16:00:00 2015

c) Execution of the mission at 10 o'clock in the morning July 31

At 10am Jul Echo ' Hello World ' >> at.out <EOT>Job 5 at Fri Jul 31 10:00:00 2015

D) Carry out the mission by 1 o'clock in the morning tomorrow.

At 1am tomorrow Echo ' Hello World ' >> at.out <EOT>Job 7 at Wed 13 01:00:00 2015

e) mission performed at 4 o'clock in the afternoon in Wednesday

At 4pm WED Echo ' Hello World ' >> at.out <EOT>Job 8 at Wed 13 16:00:00 2015

f) mission performed on 2015-05-20 12:00:00

at-t "201505201200" Echo ' Hello World ' >> at.out <EOT>Job 9 at Wed 20 12:00:00 2015

g) Lists the current user's at task List

ATQ9Wed 12:00:00 A huey8wed may 16:00:00 a huey6tue may 22:21:00 a Huey5fri Jul 31 10 : 00:00 A Huey4fri may 16:00:00 a huey7wed a 01:00:00

h) Delete a task with number 6

ATRM 6

Related commands

ATQ-equivalent to At-l

ATRM-equivalent to at-d

Batch-Performs a task when the system load is licensed, that is, when the average load is less than 0.8. The usage is similar to the AT command.

Other matters
    • You can refer to the/usr/share/doc/at-3.1.10/timespec file for a description of the time.

Linux command-at: Perform a task at a specified time

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.