Crontab Linux Command details

Source: Internet
Author: User

Crontab command is a very important point of knowledge in Linux, for system administrators, with Crontab do timed cycle tasks can greatly improve work efficiency, before the scheduled cycle task, as a system administrator must first learn how to determine whether the Crond service is open.

Chkconfig--list | grep Crond

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/88/70/wKioL1f4XhGANhSGAAC9vkZ_l_8309.png-wh_500x0-wm_3 -wmp_4-s_2419103819.png "title=" Qq20161008104636.png "alt=" Wkiol1f4xhganhsgaac9vkz_l_8309.png-wh_50 "/>

Here the service is already open state, if said does not open, then executes the following command:

Service Crond start and then view:

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/88/70/wKioL1f4XnrzbykPAAC-ywIj-xI511.png-wh_500x0-wm_3 -wmp_4-s_3204733054.png "title=" Qq20161008104821.png "alt=" Wkiol1f4xnrzbykpaac-ywij-xi511.png-wh_50 "/>


After confirming that the Crond service is turned on, it is possible to set up the cycle Timer task.

Setting crontab requires 5 * (* * * * * *), respectively, they represent the following meanings:

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/88/74/wKiom1f4Xz3yQqY3AAGox5eF85c881.png-wh_500x0-wm_3 -wmp_4-s_1639676519.png "title=" Qq20161008105031.png "alt=" Wkiom1f4xz3yqqy3aagox5ef85c881.png-wh_50 "/>

The command to set the Loop Timer task is: CRONTAB-E

Example: Perform a restart command every two minutes

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/88/74/wKiom1f4YA3CBOdoAAAQiyNU-Zw275.png-wh_500x0-wm_3 -wmp_4-s_3187547862.png "title=" Qq20161008105506.png "alt=" Wkiom1f4ya3cbodoaaaqiynu-zw275.png-wh_50 "/>


After you save the exit, you can type crontab-l to view

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/88/74/wKiom1f4YFvyALSmAAAgf7c3WUQ377.png-wh_500x0-wm_3 -wmp_4-s_742003829.png "title=" Qq20161008105623.png "alt=" Wkiom1f4yfvyalsmaaagf7c3wuq377.png-wh_50 "/>


Where Crontab-r is the command to delete all the recurring timer tasks.


This article is from the "Brother Hong Linux World" blog, so be sure to keep this source http://zhengkangkang.blog.51cto.com/12015643/1859253

Crontab Linux Command details

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.