Linux timed Tasks

Source: Internet
Author: User

Crond Scheduled Tasks

First scheduled task second level

vi/root/miao.sh

#! /bin/sh

While True

Do

echo Weixiwen Babaxiangni >>/tmp/a.log placed in A.log to execute

Sleep 1

Done

then sh miao.sh & represents the background execution Ps-aux |grep Miao with Tail-f/tmp/a.log with kill The process number closes the scheduled task that is performed in the background.

1. system Scheduled Tasks

Ll/var/log/messages* ,ll/var/log/sercure* and many more.

/ETC/LOGROTATE.D is a tool for system log management and is managed by any timing

Configure the System cron in the /etc/logrotate.conf .

The timing task of the system is configured in the/etc/cron* the user performs the scheduled tasks to distinguish not to create in the system

User timed Tasks View crontab-l

2, a scheduled task at the time, the work is generally not used in the sudden task, relying on ATD.

3, Anacron use non- 7x24 hours to boot the server, boot execution, the meaning is not big, working in the server year-round boot.

4, Crond default per minute of work commonly used. Using Crond is a timed task daemon, and the Crondtab command is a command used to set up timed task rules.

Crontab–e actually edited is /var/spool/cron/root control /etc/cron.deny/etc/cron.allow generally no tube The main view of the user's own permissions

the first five columns of the time- sharing week 6 column scheduled task rules If you arrive in the hour, the maximum is the day. If the day is up to the moon. Just say the last floor is enough. Timed any no port number

do not use both week and day because the number 3 per week may not be the same .


Linux timed 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.