Command Daquan: Linux crond Parsing

Source: Internet
Author: User

Linux has developed rapidly in recent years. As a result, many people begin to learn about Linux and you will encounter many Linux commands. Here we will introduce some usage of Linux crond and hope you will learn about Linux crond. After Linux was cropped, crond could not be started. After a day of testing, we finally learned how to solve this problem.

1. First Use crontab to read the crontab file with the root permission, or manually edit the crontab file once.

2. Start crond.

Write the following script into the startup Item to enable crond smoothly. In this way, you can save yourself from writing the timer code and write the external timer yourself. 1. writing the script file requires a lot of debugging, script File error handling is very powerful, while crond is doing well. Low write productivity.

 
 
  1. #!bin/sh  
  2. #varPath1="/var/cron/tabs" 
  3. varPath2="/var/run" 
  4. varPath3="/var/spool/cron/crontabs" 
  5. #varFile="/var/cron/tabs/root" 
  6. if[!-x"$varPath3"];then  
  7. mkdir-p"$varPath3"  
  8. fi  
  9. if[!-x"$varPath2"];then  
  10. mkdir-p"$varPath2"  
  11. fi  
  12. crontab-uroot/qianbo/crontab1  
  13. crond  
  14. #if[-f"$varFile"];then  
  15. #rm-rf"$varFile"  
  16. #fi 

Note that many tests cannot be started because the directory structure after the cropping is not the default one, and some directories are lost. Some applications cannot find the directories and rules, so an error occurs and exit. The above is the introduction of Linux crond.

  1. Allows you to use the Linux operating system to accelerate remote logon.
  2. Easily solve grub errors in Linux
  3. A Brief Introduction to Linux rescue
  4. Load average Load in Linux
  5. Slab allocator in Linux

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.