Linux: scheduled task

Source: Internet
Author: User

At: run the command at the specified time to execute a one-time scheduled task.

At has many variant commands, which can be understood as Alias commands for different at option commands.

The most important thing about at is flexible and variable time formats!

 

At time format: see/usr/share/doc/AT/timespecs

Absolute format:

Hh: mm: (in 24-hour format) hour + minute. If the specified time has passed, the at task will run at that time of the next day.

Hh: Mm [am | PM]: (12-hour) hours + minutes. If the specified time has passed, the at task will run at that time of the next day.

Midnight, noon, teatime: time text value

Hh: Mm [year] [month-name] day: specifies the year, month, and day

Hh: Mm [mmddyy | mm/DD/yy | mm. dd. yy]: specifies the year, month, and day.

Specify the-T option: [[CC] YY] mmddhhmm [. SS]

 

Relative format:

Now + Count {minutes | hours | days | weeks}

Hh: mm + {tomorrow | today}

 

At Command Options:

-T: the time when the task is scheduled. This option is not required!

-L: list at scheduled tasks. It is equivalent to ATQ.

-D: delete a scheduled task. It is equivalent to atrm.

 

-Q: query specific task information

-M: the task is completed, and an email notification is sent to the user.

-F: reads scheduled task commands from files instead of the console.

 

-C: print the task configuration information and command content to the console.

-V: displays the time when the task starts to run.

 

 

At Command Execution user control:

/Etc/at. allow: the highest priority at user control file. Only users in the list have the right to schedule at scheduled tasks.

/Etc/at. deny: Sub-at user control file. Only users not in the list have the right to schedule at scheduled tasks.

: By default, the system only has the at. deny control file. Normal users are not in the list. That is, normal users can use at to schedule tasks.

 

 

Related Files

/Etc/at. allow

/Etc/at. deny

/Var/spool/cron/atjobs

/Var/spool/cron/atspool

/Proc/loadavg

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.