Ways to implement task scheduling in Linux

Source: Internet
Author: User

There are two ways to implement a task plan:

1. Perform a task at a future point in time

Two commands can be specified:

At

Batch

(The use of at is only indicated here)

At time

At> COMMAND

At> Ctrl+d

The specified time

Absolute time: hh:mm, DD. Mm. YY, Mm/dd/yy

Relative Time: now+#

Units: minutes, hours, days, weeks

Blur Time: Noon, midnight, teatime

Execution result of the command: send the user as a message to the scheduled task

At-l: Show Job List

at-d at_job_id: Deleting an unfinished job

The following figure:

"Mail 1 view the same content as Ls/var,/cat/etc/issue"

Delete Job 2

2. Perform a task periodically

Command cron to specify

Cron: A service that operates uninterrupted

Anacron:cron, the ability to implement tasks that allow Cron to perform in the past time for a variety of reasons and not perform at once; its configuration file is/etc/anacrontab

Cron:

(1) System cron Task:

Edit/etc/crontab

Format:

Min hours days Week user tasks

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.