Unix System Management: scheduling cron tasks

Source: Internet
Author: User
Keywords UNIX System Management cron tasks
Tags aliyun cron tasks crontab delete examples file files html

To complete this palm, you can do the following things:

Use cron to submit, list, and delete time schedule tasks.

Schedule full and incremental backups to run automatically.

Let non roothttp://www.aliyun.com/zixun/aggregation/6579.html "> users use cron

14.1 Cron Daemon

-cron Daemon

To execute a command at a specified date and time

Automate daily tasks

Example:

-Trim the system's log files

-Perform system backups

-Generate weekly reports

System administrators usually need to do backup and run other processes every day, weekly, monthly. Although these processes can be run manually, they usually need to be scheduled to run automatically. The cron daemon works with this.

The cron daemon starts when the system boots and the system administrator and other users perform a time scheduling task submission.

You can use the PS command to check if the cron daemon is running.

# Ps–ef |grep cron #cron正在运行吗?

# cron # If not running, start the cron daemon.

As root, regular users can also use Cron to run programs repeatedly. The task to be performed is submitted to cron execution through the crontab command. Root uses the/var/adm/cron/cron.allow file to control who has access to the crontab command. If the user's name appears in the Cron.allow file, he has the right to use the crontab command. If the Cron.allow file does not exist, the system checks the/var/adm/cron/cron.deny file to determine if the user is denied access. If all two files exist, Cron.allow has precedence. If two files do not exist, only root can submit the task. If the Cron.deny file is an empty file, all users can use crontab.

*.allow *.deny

Who can use it?

- -

exist ignore

-Existing

Null ignored

-NULL

Super User

Any user in *.allow

No users in *.deny

Super User

Each user

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.