Routine scheduling of crontab in Linux

Source: Internet
Author: User

In Linux, crontab is used for routine work arrangements. 1. What is crontab? Periodic daemon processes for handling To-Do items and plans for dead tasks. 2. crontab command parsing. Example: 0 0 ** 1-5 cd/home/hiperry ;. /shutDwon. sh>. /logs/shutDwon. log 2> & 1 -- execute the custom shutdown script at every night and write the log information to the specified log file. Command Parsing :#. ---------------- minute (0-59) # |. ------------- hour (0-23) # |. ---------- which day of the month (1-31) # |. ------- month (1-12) OR jan, feb, mar, apr... # |. ---- day of the week (0-6) (Sunday = 0 or 7) OR sun, mon, tue, wed, thu, fri, sat # | # *** command to be executed> indicates the redirection location. For example, echo "123">/home/123.txt 1 indicates stdout standard output, the default value of the system is 1, so ">/dev/null" is equivalent to "1>/dev/null" 2 indicates stderr standard error & indicates equivalent meaning, 2> & 1, 2 is equivalent to 12> & 1 indicates that all standard output and error output will be redirected to an out. file 3. common crontab operations: crontab file: crontab-l edit crontab file: crontab-e Delete crontab file: crontab-r

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.